Enum VolatileCounterConfigurationStorage

java.lang.Object
java.lang.Enum<VolatileCounterConfigurationStorage>
org.infinispan.counter.impl.manager.VolatileCounterConfigurationStorage
All Implemented Interfaces:
Serializable, Comparable<VolatileCounterConfigurationStorage>, CounterConfigurationStorage

public enum VolatileCounterConfigurationStorage extends Enum<VolatileCounterConfigurationStorage> implements CounterConfigurationStorage
A volatile implementation of CounterConfigurationStorage.

It throws an exception if it tries to store a Storage.PERSISTENT counter.

Since:
9.2
Author:
Pedro Ruivo
  • Enum Constant Details

  • Method Details

    • values

      public static VolatileCounterConfigurationStorage[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static VolatileCounterConfigurationStorage valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • loadAll

      public Map<String,org.infinispan.counter.api.CounterConfiguration> loadAll()
      Description copied from interface: CounterConfigurationStorage
      Invoked when starts, it returns all the persisted counter's.
      Specified by:
      loadAll in interface CounterConfigurationStorage
      Returns:
      all the persisted counter's name and configurations.
    • store

      public void store(String name, org.infinispan.counter.api.CounterConfiguration configuration)
      Description copied from interface: CounterConfigurationStorage
      Persists the counter's configuration.
      Specified by:
      store in interface CounterConfigurationStorage
      Parameters:
      name - the counter's name.
      configuration - the counter's CounterConfiguration.
    • remove

      public void remove(String name)
      Description copied from interface: CounterConfigurationStorage
      Remove a counter configuration
      Specified by:
      remove in interface CounterConfigurationStorage
      Parameters:
      name - the counter's name.
    • validatePersistence

      public void validatePersistence(org.infinispan.counter.api.CounterConfiguration configuration)
      Description copied from interface: CounterConfigurationStorage
      Validates if the CounterConfiguration has a valid Storage.

      It throws an exception if the implementation doesn't support one or more Storage modes.

      Specified by:
      validatePersistence in interface CounterConfigurationStorage
      Parameters:
      configuration - the CounterConfiguration to check.