Class SystemObjectCache
- java.lang.Object
-
- com.evolveum.midpoint.model.common.SystemObjectCache
-
- All Implemented Interfaces:
Cache
@Component public class SystemObjectCache extends Object implements Cache
Cache for system object such as SystemConfigurationType. This is a global cache, independent of the request. It will store the system configuration in memory. It will check for system configuration updates in regular interval using the getVersion() method.This supplements the RepositoryCache. RepositoryCache works on per-request (per-operation) basis. The SystemObjectCache is global. Its goal is to reduce the number of getObject(SystemConfiguration) and the getVersion(SystemConfiguration) calls.
In the future: May be used for more objects that are often used and seldom changed, e.g. object templates.
TODO: use real repo instead of repo cache
- Author:
- semancik
-
-
Constructor Summary
Constructors Constructor Description SystemObjectCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dumpContent()
SearchResultList<PrismObject<ArchetypeType>>
getAllArchetypes(OperationResult result)
PrismObject<ArchetypeType>
getArchetype(String oid, OperationResult result)
ExpressionProfile
getExpressionProfile(String identifier, OperationResult result)
PrismObject<SecurityPolicyType>
getSecurityPolicy()
@NotNull Collection<SingleCacheStateInformationType>
getStateInformation()
PrismObject<SystemConfigurationType>
getSystemConfiguration(OperationResult result)
void
invalidate(Class<?> type, String oid, CacheInvalidationContext context)
void
invalidateCaches()
void
register()
void
unregister()
-
-
-
Method Detail
-
register
@PostConstruct public void register()
-
unregister
@PreDestroy public void unregister()
-
getSystemConfiguration
public PrismObject<SystemConfigurationType> getSystemConfiguration(OperationResult result) throws SchemaException
- Throws:
SchemaException
-
getSecurityPolicy
public PrismObject<SecurityPolicyType> getSecurityPolicy() throws SchemaException
- Throws:
SchemaException
-
invalidateCaches
public void invalidateCaches()
-
getArchetype
public PrismObject<ArchetypeType> getArchetype(String oid, OperationResult result) throws ObjectNotFoundException, SchemaException
-
getAllArchetypes
public SearchResultList<PrismObject<ArchetypeType>> getAllArchetypes(OperationResult result) throws SchemaException
- Throws:
SchemaException
-
getExpressionProfile
public ExpressionProfile getExpressionProfile(String identifier, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
invalidate
public void invalidate(Class<?> type, String oid, CacheInvalidationContext context)
- Specified by:
invalidate
in interfaceCache
-
getStateInformation
@NotNull public @NotNull Collection<SingleCacheStateInformationType> getStateInformation()
- Specified by:
getStateInformation
in interfaceCache
-
dumpContent
public void dumpContent()
- Specified by:
dumpContent
in interfaceCache
-
-