Top Description Methods
org.apache.derby.impl.store.replication.master

pack-priv Interface LogShipper

Known Direct Implementers
org.apache.derby.impl.store.replication.master.AsynchronousLogShipper
Imports
java.io.IOException, org.apache.derby.shared.common.error.StandardException

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 TypeMethod and Description
public void
flushBuffer()

Transmits all the log records in the log buffer to the slave.

public void
flushedInstance(long
a long that contains the latest instance of the log record that has been flushed to the disk.
latestInstanceFlushedToDisk
)

updates the information about the latest instance of the log record that has been flushed to the disk.

public void
forceFlush()

Ships the next log record chunk, if available, from the log buffer to the slave.

public void
workToDo()

Used to notify the log shipper that a log buffer element is full.

Method Detail

flushBufferback to summary
public void flushBuffer() throws IOException, StandardException

Transmits all the log records in the log buffer to the slave.

Exceptions
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.
flushedInstanceback to summary
public void flushedInstance(long latestInstanceFlushedToDisk)

updates the information about the latest instance of the log record that has been flushed to the disk.

Parameters
latestInstanceFlushedToDisk:long

a long that contains the latest instance of the log record that has been flushed to the disk.

forceFlushback to summary
public void forceFlush() throws IOException, StandardException

Ships the next log record chunk, if available, from the log buffer to the slave.

Exceptions
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.
workToDoback to summary
public void workToDo()

Used to notify the log shipper that a log buffer element is full.