Skip to content


Creating Instance

CommandRunner takes the following to be created:

CommandRunner is created when:


CommandRunner is given a CommandQueue when created.

The CommandQueue is used when CommandRunner is requested for the following:


CommandQueue getCommandQueue()

getCommandQueue is used when:

Command Deserializer

CommandRunner is given a Deserializer (Apache Kafka) of Commands when created.

The Deserializer is used in the following:

Start Processing Queued Commands

void start()

start creates and starts a Java thread (on a single-threaded thread pool) to continuously fetchAndRunCommands.

Every time fetchAndRunCommands is executed, the thread prints out the following TRACE message to the logs:

Polling for new writes to command topic

start is used when:

Fetching and Running Queued Commands

void fetchAndRunCommands()

fetchAndRunCommands requests the CommandQueue for new commands.

fetchAndRunCommands prints out the following DEBUG message to the logs:

Found [size] new writes to command topic

For every QueuedCommand, fetchAndRunCommands executes them.

Executing Statement

void executeStatement(
  QueuedCommand queuedCommand)

executeStatement takes the statement from the given QueuedCommand and prints out the following INFO message to the logs:

Executing statement: [commandStatement]

executeStatement creates a Runnable (Java) which, when run, requests the InteractiveStatementExecutor to handle the QueuedCommand and prints out the following INFO message to the logs:

Executed statement: [commandStatement]


void processPriorCommands(
  PersistentQueryCleanupImpl queryCleanup)


processPriorCommands is used when:

Back to top