All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.counter.impl.manager.CounterConfigurationStorage Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev05
Show newest version
package org.infinispan.counter.impl.manager;

import java.util.Map;

import org.infinispan.counter.api.CounterConfiguration;

/**
 * A local storage to persist counter's {@link CounterConfiguration}.
 *
 * @author Pedro Ruivo
 * @since 9.2
 */
public interface CounterConfigurationStorage {

   /**
    * Invoked when starts, it returns all the persisted counter's.
    *
    * @return all the persisted counter's name and configurations.
    */
   Map loadAll();

   /**
    * Persists the counter's configuration.
    *
    * @param name          the counter's name.
    * @param configuration the counter's {@link CounterConfiguration}.
    */
   void store(String name, CounterConfiguration configuration);

   /**
    * Remove a counter configuration
    *
    * @param name the counter's name.
    */
   void remove(String name);

   /**
    * Validates if the {@link CounterConfiguration} has a valid {@link org.infinispan.counter.api.Storage}.
    * 

* It throws an exception if the implementation doesn't support one or more {@link org.infinispan.counter.api.Storage} modes. * * @param configuration the {@link CounterConfiguration} to check. */ void validatePersistence(CounterConfiguration configuration); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy