public abstract class CommandService extends Object
NOTE: CommandService
is currently available only on
GemFire Manager nodes.
Constructor and Description |
---|
CommandService() |
Modifier and Type | Method and Description |
---|---|
abstract CommandStatement |
createCommandStatement(String commandString)
Creates a
CommandStatement from the specified command string. |
static CommandService |
createLocalCommandService(Cache cache)
Returns a newly created or existing instance of the
CommandService |
static CommandService |
getUsableLocalCommandService()
Returns an existing 'usable'
CommandService> . |
abstract boolean |
isUsable()
Returns whether the underlying
Cache exists and is not closed. |
abstract Result |
processCommand(String commandString)
Processes the specified command string.
|
public abstract boolean isUsable()
Cache
exists and is not closed.
The Cache must be ready in order for commands to be processed using this
CommandService
. A call to this method should be made before
attempting to process commands.Cache
exists and is not closed, false
otherwise.public abstract Result processCommand(String commandString)
commandString
- Command string to be processed.Result
of the execution of this command string.public abstract CommandStatement createCommandStatement(String commandString)
CommandStatement
from the specified command string.
Only remote commands can be processed using this method. Refer to the
vFabric GemFire documentation for details.commandString
- Command string from which to create a
CommandStatement
.CommandStatement
which can be used to repeatedly
process the same command.CommandStatement.process()
public static final CommandService createLocalCommandService(Cache cache) throws CommandServiceException
CommandService associated with the
specified Cache
.
cache
- Underlying Cache
instance to be used to create a Command Service.CommandServiceException
- If command service could not be initialized.public static final CommandService getUsableLocalCommandService()
CommandService>
. A
CommandService
is considered usable if at has an underlying
Cache
which is not closed.CommandService
or null if one cannot be
found.Copyright © 1997-2017 Pivotal Software, Inc. All rights reserved.