public class CounterDelegator extends BaseDelegator implements ICounterDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
CounterDelegator(IOptionsServer server)
Instantiates a new change delegator.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteCounter(java.lang.String counterName,
boolean perforceCounter) |
java.lang.String |
getCounter(java.lang.String counterName) |
java.lang.String |
getCounter(java.lang.String counterName,
CounterOptions opts)
Get the value of a named Perforce counter from the Perforce server.
|
void |
setCounter(java.lang.String counterName,
java.lang.String value,
boolean perforceCounter) |
java.lang.String |
setCounter(java.lang.String counterName,
java.lang.String value,
CounterOptions opts)
Create, set or delete a counter on a Perforce server.
|
public CounterDelegator(IOptionsServer server)
server
- the serverpublic java.lang.String getCounter(java.lang.String counterName) throws ConnectionException, RequestException, AccessException
getCounter
in interface ICounterDelegator
ConnectionException
RequestException
AccessException
public java.lang.String getCounter(java.lang.String counterName, CounterOptions opts) throws P4JavaException
ICounterDelegator
Note that despite their name, counters can be any value, not just a number; hence the string return value here.
getCounter
in interface ICounterDelegator
counterName
- non-null counter name.opts
- CounterOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.public void setCounter(java.lang.String counterName, java.lang.String value, boolean perforceCounter) throws ConnectionException, RequestException, AccessException
setCounter
in interface ICounterDelegator
ConnectionException
RequestException
AccessException
public java.lang.String setCounter(java.lang.String counterName, java.lang.String value, CounterOptions opts) throws P4JavaException
ICounterDelegator
setCounter
in interface ICounterDelegator
counterName
- non-null counter name.value
- value the counter should be set to; can be null if the set
operation is an increment.opts
- CounterOptions object describing optional parameters; if null,
no options are set.P4JavaException
- if an error occurs processing this method and its parameters.public void deleteCounter(java.lang.String counterName, boolean perforceCounter) throws ConnectionException, RequestException, AccessException
deleteCounter
in interface ICounterDelegator
ConnectionException
RequestException
AccessException