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(String counterName,
boolean perforceCounter) |
String |
getCounter(String counterName) |
String |
getCounter(String counterName,
CounterOptions opts)
Get the value of a named Perforce counter from the Perforce server.
|
void |
setCounter(String counterName,
String value,
boolean perforceCounter) |
String |
setCounter(String counterName,
String value,
CounterOptions opts)
Create, set or delete a counter on a Perforce server.
|
public CounterDelegator(IOptionsServer server)
server - the serverpublic String getCounter(String counterName) throws ConnectionException, RequestException, AccessException
getCounter in interface ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionpublic String getCounter(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(String counterName, String value, boolean perforceCounter) throws ConnectionException, RequestException, AccessException
setCounter in interface ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionpublic String setCounter(String counterName, 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(String counterName, boolean perforceCounter) throws ConnectionException, RequestException, AccessException
deleteCounter in interface ICounterDelegatorConnectionExceptionRequestExceptionAccessExceptionCopyright © 2017 Perforce Software. All Rights Reserved.