Class SystemObjectCache
java.lang.Object
com.evolveum.midpoint.repo.common.SystemObjectCache
- All Implemented Interfaces:
Cache
,CacheInvalidationListener
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getAllArchetypes
(OperationResult result) getArchetype
(String oid, OperationResult result) @NotNull ExpressionProfile
getExpressionProfile
(@NotNull String identifier, OperationResult result) @NotNull Collection<SingleCacheStateInformationType>
@Nullable PrismObject<SystemConfigurationType>
@Nullable SystemConfigurationType
void
invalidate
(Class<?> type, String oid, CacheInvalidationContext context) void
void
register()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.repo.api.Cache
getEventSpecifications, invalidate
-
Constructor Details
-
SystemObjectCache
public SystemObjectCache()
-
-
Method Details
-
register
@PostConstruct public void register() -
unregister
@PreDestroy public void unregister() -
getSystemConfigurationBean
@Nullable public @Nullable SystemConfigurationType getSystemConfigurationBean(OperationResult result) throws SchemaException - Throws:
SchemaException
-
getSystemConfiguration
@Nullable public @Nullable PrismObject<SystemConfigurationType> getSystemConfiguration(OperationResult result) throws SchemaException - Throws:
SchemaException
-
getSecurityPolicy
- 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
@NotNull public @NotNull ExpressionProfile getExpressionProfile(@NotNull @NotNull String identifier, OperationResult result) throws SchemaException, ConfigurationException -
invalidate
- Specified by:
invalidate
in interfaceCache
-
getStateInformation
- Specified by:
getStateInformation
in interfaceCache
-
dumpContent
public void dumpContent()- Specified by:
dumpContent
in interfaceCache
-