|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.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 Cacheablecommit in class SourceControlObjectCommitExceptionpublic HashDecay getCache()
SourceControlObject
getCache in interface CacheablegetCache in class SourceControlObject
public static Counter[] getCounters(Env env)
throws PerforceException
PerforceExceptionpublic String getName()
public int getValue()
public Change[] review()
throws PerforceException
PerforceExceptionpublic void setName(String name)
public void setValue(int value)
value - New counter value
public void sync()
throws PerforceException
SourceControlObject
sync in interface Cacheablesync in class SourceControlObjectPerforceExceptionpublic String toXML()
SourceControlObject
toXML in class SourceControlObject
|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||