Interface LogShipper
- All Known Implementing Classes:
AsynchronousLogShipper
interface LogShipper
This is the interface for the replication log shipper. The log shipper
is started by the master controller service. The log shipper is responsible
for shipping of the log chunks from the log buffer (on the master) to the
slave. The log shipper handles both periodic shipping of log records as well
as request based shipping. The request based shipping would be useful when
the log buffer becomes full and needs to be freed before it can store
subsequent log chunks.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Transmits all the log records in the log buffer to the slave.void
flushedInstance
(long latestInstanceFlushedToDisk) updates the information about the latest instance of the log record that has been flushed to the disk.void
Ships the next log record chunk, if available, from the log buffer to the slave.void
workToDo()
Used to notify the log shipper that a log buffer element is full.
-
Method Details
-
flushedInstance
void flushedInstance(long latestInstanceFlushedToDisk) updates the information about the latest instance of the log record that has been flushed to the disk.- Parameters:
latestInstanceFlushedToDisk
- a long that contains the latest instance of the log record that has been flushed to the disk.
-
forceFlush
Ships the next log record chunk, if available, from the log buffer to the slave.- Throws:
IOException
- If an exception occurs while trying to ship the replication message (containing the log records) across the network.StandardException
- If an exception occurs while trying to read log records from the log buffer.
-
flushBuffer
Transmits all the log records in the log buffer to the slave.- Throws:
IOException
- If an exception occurs while trying to ship the replication message (containing the log records) across the network.StandardException
- If an exception occurs while trying to read log records from the log buffer.
-
workToDo
void workToDo()Used to notify the log shipper that a log buffer element is full.
-