com.bigdata.btree
Interface ICounter

All Known Implementing Classes:
BTree.Counter, BTree.PartitionedCounter, ReadOnlyCounter

public interface ICounter

An interface for a counter. Mutable btrees expose mutable counters while read-only btrees do not. Like the mutable BTree, the mutable counter is NOT thread-safe. An unpartitioned index exposes a single counter for the entire index. A partitioned index exposes a counter per index partition and the partition identified forms the high int32 for the counter.

Version:
$Id: ICounter.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
IIndex.getCounter()

Method Summary
 long get()
          The current value of the counter (initially zero).
 long incrementAndGet()
          Increment the current value of the counter and then return its value (atomic).
 

Method Detail

get

long get()
The current value of the counter (initially zero).


incrementAndGet

long incrementAndGet()
Increment the current value of the counter and then return its value (atomic).



Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.