Package org.apache.ignite
Interface IgniteAtomicSequence
- 
- All Superinterfaces:
- AutoCloseable,- Closeable
 
 public interface IgniteAtomicSequence extends Closeable This interface provides a rich API for working with distributed atomic sequence.FunctionalityDistributed atomic sequence includes the following main functionality:- 
 Method get()gets current value from atomic sequence.
- 
 Various get..(..)methods get current value from atomic sequence and increase atomic sequences value.
- 
 Various add..(..)increment(..)methods increase atomic sequences value and return increased value.
- 
 Method batchSize(int size)sets batch size of current atomic sequence.
- 
 Method batchSize()gets current batch size of atomic sequence.
- 
 Method name()gets name of atomic sequence.
 Creating Distributed Atomic SequenceInstance of distributed atomic sequence can be created by calling the following method:
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description longaddAndGet(long l)Addslelements to atomic sequence and gets value of atomic sequence.intbatchSize()Gets local batch size for this atomic sequence.voidbatchSize(int size)Sets local batch size for atomic sequence.voidclose()Removes this atomic sequence.longget()Gets current value of atomic sequence.longgetAndAdd(long l)Gets current value of atomic sequence and addslelements.longgetAndIncrement()Gets and increments current value of atomic sequence.longincrementAndGet()Increments and returns the value of atomic sequence.Stringname()Name of atomic sequence.booleanremoved()Gets status of atomic sequence.
 
- 
- 
- 
Method Detail- 
nameString name() Name of atomic sequence.- Returns:
- Name of atomic sequence.
 
 - 
getlong get() throws IgniteException Gets current value of atomic sequence.- Returns:
- Value of atomic sequence.
- Throws:
- IgniteException- If operation failed.
 
 - 
incrementAndGetlong incrementAndGet() throws IgniteExceptionIncrements and returns the value of atomic sequence.- Returns:
- Value of atomic sequence after increment.
- Throws:
- IgniteException- If operation failed.
 
 - 
getAndIncrementlong getAndIncrement() throws IgniteExceptionGets and increments current value of atomic sequence.- Returns:
- Value of atomic sequence before increment.
- Throws:
- IgniteException- If operation failed.
 
 - 
addAndGetlong addAndGet(long l) throws IgniteExceptionAddslelements to atomic sequence and gets value of atomic sequence.- Parameters:
- l- Number of added elements.
- Returns:
- Value of atomic sequence.
- Throws:
- IgniteException- If operation failed.
 
 - 
getAndAddlong getAndAdd(long l) throws IgniteExceptionGets current value of atomic sequence and addslelements.- Parameters:
- l- Number of added elements.
- Returns:
- Value of atomic sequence.
- Throws:
- IgniteException- If operation failed.
 
 - 
batchSizeint batchSize() Gets local batch size for this atomic sequence.- Returns:
- Sequence batch size.
 
 - 
batchSizevoid batchSize(int size) Sets local batch size for atomic sequence.- Parameters:
- size- Sequence batch size. Must be more then 0.
 
 - 
removedboolean removed() Gets status of atomic sequence.- Returns:
- trueif atomic sequence was removed from cache,- falseotherwise.
 
 - 
closevoid close() Removes this atomic sequence.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IgniteException- If operation failed.
 
 
- 
 
-