Class SubscriptionStateCache
java.lang.Object
com.evolveum.midpoint.repo.common.subscription.SubscriptionStateCache
- All Implemented Interfaces:
SystemConfigurationChangeListener
,TaskManager.ClusteringAvailabilityProvider
@Component
public class SubscriptionStateCache
extends Object
implements SystemConfigurationChangeListener, TaskManager.ClusteringAvailabilityProvider
Computes the
SubscriptionState
, caching components needed to compute it.
(The caching may change if needed.)-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull SubscriptionState
Use only if there's no way of obtaining the operation result!@NotNull SubscriptionState
getSubscriptionState
(OperationResult result) This is the recommended version.void
init()
boolean
void
shutdown()
void
update
(@Nullable SystemConfigurationType value) Updates the listener's internal state with the configuration provided.
-
Constructor Details
-
SubscriptionStateCache
public SubscriptionStateCache()
-
-
Method Details
-
getSubscriptionState
Use only if there's no way of obtaining the operation result! -
getSubscriptionState
This is the recommended version. -
isClusteringAvailable
public boolean isClusteringAvailable()- Specified by:
isClusteringAvailable
in interfaceTaskManager.ClusteringAvailabilityProvider
-
update
Description copied from interface:SystemConfigurationChangeListener
Updates the listener's internal state with the configuration provided.- Specified by:
update
in interfaceSystemConfigurationChangeListener
- Parameters:
value
- Current value of the system configuration object. It is 'null' if the object does not exist. Usually listeners keep their current state in such cases, but if needed, it will have the information about missing sysconfig object, so it could act accordingly.
-
init
@PostConstruct public void init() -
shutdown
@PreDestroy public void shutdown()
-