Class ForwardingCommandExecutor
java.lang.Object
com.linecorp.centraldogma.server.command.ForwardingCommandExecutor
- All Implemented Interfaces:
CommandExecutor
A
CommandExecutor
which forwards all its method calls to another CommandExecutor
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final <T extends CommandExecutor>
Tdelegate()
<T> CompletableFuture
<T> Executes the specifiedCommand
.boolean
Returnstrue
if the executor is started.boolean
Returnstrue
if the executor can accept theCommand
s making a change to the replica.int
Returns the ID of a replica.void
setWritable
(boolean writable) Makes the executor read/write mode or read-only mode.void
setWriteQuota
(String projectName, String repoName, QuotaConfig writeQuota) start()
Starts the executor.Returns the status manager of this executor.stop()
Stops the executor.toString()
-
Constructor Details
-
ForwardingCommandExecutor
-
-
Method Details
-
delegate
-
replicaId
public int replicaId()Description copied from interface:CommandExecutor
Returns the ID of a replica.- Specified by:
replicaId
in interfaceCommandExecutor
-
isStarted
public boolean isStarted()Description copied from interface:CommandExecutor
Returnstrue
if the executor is started.- Specified by:
isStarted
in interfaceCommandExecutor
-
start
Description copied from interface:CommandExecutor
Starts the executor.- Specified by:
start
in interfaceCommandExecutor
-
stop
Description copied from interface:CommandExecutor
Stops the executor.- Specified by:
stop
in interfaceCommandExecutor
-
isWritable
public boolean isWritable()Description copied from interface:CommandExecutor
Returnstrue
if the executor can accept theCommand
s making a change to the replica.false
would be returned if the replica is running as a read-only mode.- Specified by:
isWritable
in interfaceCommandExecutor
-
setWritable
public void setWritable(boolean writable) Description copied from interface:CommandExecutor
Makes the executor read/write mode or read-only mode.- Specified by:
setWritable
in interfaceCommandExecutor
- Parameters:
writable
-true
to make the executor read/write mode, orfalse
to make it read-only mode
-
setWriteQuota
Description copied from interface:CommandExecutor
- Specified by:
setWriteQuota
in interfaceCommandExecutor
-
execute
Description copied from interface:CommandExecutor
Executes the specifiedCommand
.- Specified by:
execute
in interfaceCommandExecutor
- Type Parameters:
T
- the type of the result to be returned- Parameters:
command
- the command which is supposed to be executed
-
statusManager
Description copied from interface:CommandExecutor
Returns the status manager of this executor.- Specified by:
statusManager
in interfaceCommandExecutor
-
toString
-