public final class WriterController extends AbstractController implements IWriterController
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PREFIX |
static java.lang.String |
QUEUE_PUT_STRATEGY
The fully qualified name of the put strategy
|
static java.lang.String |
QUEUE_TAKE_STRATEGY
The fully qualified name of the take strategy
|
static java.lang.String |
RECORD_QUEUE_FQN
The fully qualified name of the queue to be used for the records.
|
static java.lang.String |
RECORD_QUEUE_INSERT_BEHAVIOR
The name of the configuration determining the insert behavior to the queue of
the writer.
|
static java.lang.String |
RECORD_QUEUE_SIZE
The name of the configuration determining the size of the queue of this
writer.
|
monitoringController| Constructor and Description |
|---|
WriterController(Configuration configuration)
Creates a new instance of this class using the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup()
This method should clean up.
|
protected void |
init()
This method should to the initialization work.
|
boolean |
newMonitoringRecord(IMonitoringRecord record)
Called for each new record to write it out to the pre-configured target (e.g., file system, database, or messaging queue).
|
java.lang.String |
toString() |
void |
waitForTermination(long timeoutInMs)
Waits for the termination of the monitoring controller.
|
createAndInitialize, isTerminated, setMonitoringController, terminatepublic static final java.lang.String PREFIX
public static final java.lang.String RECORD_QUEUE_SIZE
public static final java.lang.String RECORD_QUEUE_INSERT_BEHAVIOR
public static final java.lang.String RECORD_QUEUE_FQN
public static final java.lang.String QUEUE_PUT_STRATEGY
public static final java.lang.String QUEUE_TAKE_STRATEGY
public WriterController(Configuration configuration)
configuration - The configuration for the controller.protected void init()
AbstractControllerinit in class AbstractControllerprotected void cleanup()
AbstractControllercleanup in class AbstractControllerpublic java.lang.String toString()
toString in class AbstractControllerpublic boolean newMonitoringRecord(IMonitoringRecord record)
IWriterController
Called for each new record to write it out to the pre-configured target (e.g., file system, database, or messaging queue). This method could invoke the given
record's methods declared in IMonitoringRecord and thus alter its loggingTimestamp property.
Notice, that this method should not throw an exception, but indicate an error by the return value false.
newMonitoringRecord in interface IMonitoringRecordReceivernewMonitoringRecord in interface IWriterControllerrecord - the record.public void waitForTermination(long timeoutInMs)
throws java.lang.InterruptedException
IWriterControllerMonitoringController.terminateMonitoring().waitForTermination in interface IWriterControllertimeoutInMs - timeout in milliseconds to wait (a timeout of 0 means to wait forever)java.lang.InterruptedException - if the calling thread was interrupted while waiting for the terminationCopyright 2021 Kieker Project, http://kieker-monitoring.net