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

org.infinispan.counter.api.SyncWeakCounter Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.counter.api;

/**
 * A synchronous {@link WeakCounter}.
 *
 * @author Pedro Ruivo
 * @since 9.2
 */
public interface SyncWeakCounter {


   /**
    * @see WeakCounter#getName()
    */
   String getName();

   /**
    * @see WeakCounter#getValue()
    */
   long getValue();

   /**
    * @see WeakCounter#increment()
    */
   default void increment() {
      add(1);
   }

   /**
    * @see WeakCounter#decrement()
    */
   default void decrement() {
      add(-1);
   }

   /**
    * @see WeakCounter#add(long)
    */
   void add(long delta);

   /**
    * @see WeakCounter#reset()
    */
   void reset();

   /**
    * @see WeakCounter#getConfiguration()
    */
   CounterConfiguration getConfiguration();

   /**
    * @see WeakCounter#remove()
    */
   void remove();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy