org.jgroups.blocks.atomic.BaseCounter Maven / Gradle / Ivy
Go to download
This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including
all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and
JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up
with different versions on classes on the class path).
The newest version!
package org.jgroups.blocks.atomic;
/**
* Base interface for all counters
*
* @author Bela Ban
* @since 5.2
*/
public interface BaseCounter {
/**
* @return The counter's name.
*/
String getName();
/**
* Returns a {@link SyncCounter} wrapper for this instance. If this counter is already synchronous, then this
* counter instance is returned (no-op)
*
* @return The {@link SyncCounter} instance;
*/
SyncCounter sync();
/**
* Returns an {@link AsyncCounter} wrapper for this instance. If this counter is already asynchronous, then
* this counter instance is returned (no-op)
*
* @return The {@link AsyncCounter} instance.
*/
AsyncCounter async();
}