|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perforce.api.SourceControlObject com.perforce.api.Counter
public final class Counter
Representation of perforce counters. This class can be used to set and get the value of a counter. It can also be used to determine who reviews the changes represented by a particular value.
Constructor Summary | |
---|---|
Counter()
Default no-argument constructor. |
|
Counter(Env environ,
String name)
|
|
Counter(String name)
|
Method Summary | |
---|---|
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Counter[] |
getCounters(Env env)
Returns an array of all the Counters established on the server. |
String |
getName()
|
int |
getValue()
Returns the value of this Counter. |
Change[] |
review()
Determine the changelists that need to be reviewed. |
void |
setName(String name)
|
void |
setValue(int value)
Sets the value for the Counter. |
void |
sync()
Brings this object back into sync with Perforce. |
String |
toXML()
Returns a string containing the object in XML form. |
Methods inherited from class com.perforce.api.SourceControlObject |
---|
clearCache, getEnv, getSyncTime, getUpdateTime, inSync, invalidate, outOfSync, refreshUpdateTime, setEnv |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Counter()
public Counter(Env environ, String name)
public Counter(String name)
Method Detail |
---|
public void commit() throws CommitException
SourceControlObject
commit
in interface Cacheable
commit
in class SourceControlObject
CommitException
public HashDecay getCache()
SourceControlObject
getCache
in interface Cacheable
getCache
in class SourceControlObject
public static Counter[] getCounters(Env env) throws PerforceException
PerforceException
public String getName()
public int getValue()
public Change[] review() throws PerforceException
PerforceException
public void setName(String name)
public void setValue(int value)
value
- New counter valuepublic void sync() throws PerforceException
SourceControlObject
sync
in interface Cacheable
sync
in class SourceControlObject
PerforceException
public String toXML()
SourceControlObject
toXML
in class SourceControlObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |