|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xerox.amazonws.sdb.Counter
public class Counter
This class implements a thread-safe, persistent counter, backed by SimpleDB.
Constructor Summary | |
---|---|
Counter(Domain domain,
String counterName)
Constructs a counter, where a value may already be stored. |
|
Counter(Domain domain,
String counterName,
long initValue)
Constructs a counter with a specified initial value |
Method Summary | |
---|---|
String |
getName()
This method returns the counter name |
long |
nextValue()
This method returns the next value, period. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Counter(Domain domain, String counterName) throws SDBException
domain
- the domain to use for the countercounterName
- the name of this counter, must be unique within this domain
SDBException
- wraps checked exceptionspublic Counter(Domain domain, String counterName, long initValue) throws SDBException
domain
- the domain to use for the countercounterName
- the name of this counter, must be unique within this domaininitValue
- the initial value for the counter
SDBException
- wraps checked exceptionsMethod Detail |
---|
public String getName()
public long nextValue() throws SDBException
SDBException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |