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 ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionpublic java.lang.String getCounter(java.lang.String counterName,
CounterOptions opts)
throws P4JavaException
ICounterDelegatorNote that despite their name, counters can be any value, not just a number; hence the string return value here.
getCounter in interface ICounterDelegatorcounterName - 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 ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionpublic java.lang.String setCounter(java.lang.String counterName,
java.lang.String value,
CounterOptions opts)
throws P4JavaException
ICounterDelegatorsetCounter in interface ICounterDelegatorcounterName - 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 ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionCopyright © 2021 Perforce Software. All Rights Reserved.