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 Details

    • SubscriptionStateCache

      public SubscriptionStateCache()
  • Method Details

    • getSubscriptionState

      @NotNull public @NotNull SubscriptionState getSubscriptionState()
      Use only if there's no way of obtaining the operation result!
    • getSubscriptionState

      @NotNull public @NotNull SubscriptionState getSubscriptionState(OperationResult result)
      This is the recommended version.
    • isClusteringAvailable

      public boolean isClusteringAvailable()
      Specified by:
      isClusteringAvailable in interface TaskManager.ClusteringAvailabilityProvider
    • update

      public void update(@Nullable @Nullable SystemConfigurationType value)
      Description copied from interface: SystemConfigurationChangeListener
      Updates the listener's internal state with the configuration provided.
      Specified by:
      update in interface SystemConfigurationChangeListener
      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()