Interface CounterConfigurationStorage

All Known Implementing Classes:
PersistedCounterConfigurationStorage, VolatileCounterConfigurationStorage

public interface CounterConfigurationStorage
A local storage to persist counter's CounterConfiguration.
Since:
9.2
Author:
Pedro Ruivo
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<String,org.infinispan.counter.api.CounterConfiguration>
    Invoked when starts, it returns all the persisted counter's.
    void
    remove(String name)
    Remove a counter configuration
    void
    store(String name, org.infinispan.counter.api.CounterConfiguration configuration)
    Persists the counter's configuration.
    void
    validatePersistence(org.infinispan.counter.api.CounterConfiguration configuration)
    Validates if the CounterConfiguration has a valid Storage.
  • Method Details

    • loadAll

      Map<String,org.infinispan.counter.api.CounterConfiguration> loadAll()
      Invoked when starts, it returns all the persisted counter's.
      Returns:
      all the persisted counter's name and configurations.
    • store

      void store(String name, org.infinispan.counter.api.CounterConfiguration configuration)
      Persists the counter's configuration.
      Parameters:
      name - the counter's name.
      configuration - the counter's CounterConfiguration.
    • remove

      void remove(String name)
      Remove a counter configuration
      Parameters:
      name - the counter's name.
    • validatePersistence

      void validatePersistence(org.infinispan.counter.api.CounterConfiguration configuration)
      Validates if the CounterConfiguration has a valid Storage.

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

      Parameters:
      configuration - the CounterConfiguration to check.