|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.THL
public class THL
Implements a standard Store interface on the THL (transaction history log).
| Field Summary | |
|---|---|
protected int |
bufferSize
I/O buffer size in bytes. |
protected PluginContext |
context
|
protected java.lang.String |
eventSerializerClass
Name of the class used to serialize events. |
protected int |
logConnectionTimeout
Idle log Connection timeout in seconds. |
protected long |
logFileRetainMillis
Log file retention in milliseconds. |
protected int |
logFileSize
Log file maximum size in bytes. |
protected static org.apache.log4j.Logger |
logger
|
static int |
MAJOR
|
static int |
MINOR
|
protected java.lang.String |
password
|
static java.lang.String |
PLAINTEXT_URI_SCHEME
|
static java.lang.String |
SSL_URI_SCHEME
|
static java.lang.String |
SUFFIX
|
protected java.lang.String |
url
|
protected java.lang.String |
user
|
protected java.lang.String |
vendor
|
| Constructor Summary | |
|---|---|
THL()
Creates a store instance. |
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
LogConnection |
connect(boolean readonly)
Connect to the log. |
void |
disconnect(LogConnection client)
Disconnect from the log. |
java.util.LinkedList<ConnectorHandler> |
getClients()
Returns list of currently connected clients. |
ReplDBMSHeader |
getLastAppliedEvent()
Get the last applied event. |
ReplDBMSHeader |
getLastLoggedEvent()
Get the last event applied to the replicator log or return null if there is no such event. |
long |
getMaxStoredSeqno()
Return max stored sequence number. |
long |
getMinStoredSeqno()
Return minimum stored sequence number. |
java.lang.String |
getName()
Gets the storage name. |
java.lang.String |
getPassword()
|
int |
getResetPeriod()
|
boolean |
getStopOnDBError()
|
java.lang.String |
getStorageListenerUri()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUser()
|
boolean |
isLogConsistencyCheck()
|
boolean |
pollSeqno(long seqno)
Returns true if the indicated sequence number is available. |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
setBufferSize(int bufferSize)
Sets the log buffer size. |
void |
setDoChecksum(boolean doChecksum)
Determines whether to checksum log records. |
void |
setEventSerializer(java.lang.String eventSerializer)
Sets the event serializer name. |
void |
setFlushIntervalMillis(long flushIntervalMillis)
Sets the interval between flush calls. |
void |
setFsyncOnFlush(boolean fsyncOnFlush)
If set to true, perform an fsync with every flush. |
void |
setLogConnectionTimeout(int logConnectionTimeout)
Sets the idle log connection timeout in seconds. |
void |
setLogConsistencyCheck(boolean checkRecoveredMasterLog)
|
void |
setLogDir(java.lang.String logDir)
Sets the logDir value. |
void |
setLogFileRetention(java.lang.String logFileRetention)
Sets the log file retention interval. |
void |
setLogFileSize(int logFileSize)
Sets the logFileSize value in bytes. |
void |
setName(java.lang.String name)
Sets the storage name. |
void |
setPassword(java.lang.String password)
|
void |
setReadOnly(java.lang.String ro)
|
void |
setResetPeriod(int resetPeriod)
|
void |
setStopOnDBError(boolean stopOnDBErr)
|
void |
setStorageListenerUri(java.lang.String storageListenerUri)
|
void |
setUrl(java.lang.String url)
|
void |
setUser(java.lang.String user)
|
void |
setVendor(java.lang.String vendor)
|
TungstenProperties |
status()
Returns status information as a set of named properties. |
void |
updateActiveSeqno(long activeSeqno)
Updates the active sequence number on the log. |
void |
updateCommitSeqno(THLEvent thlEvent)
Updates the sequence number stored in the catalog trep_commit_seqno. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger logger
public static final int MAJOR
public static final int MINOR
public static final java.lang.String SUFFIX
public static final java.lang.String PLAINTEXT_URI_SCHEME
public static final java.lang.String SSL_URI_SCHEME
protected java.lang.String password
protected java.lang.String url
protected java.lang.String user
protected java.lang.String vendor
protected java.lang.String eventSerializerClass
protected int logFileSize
protected long logFileRetainMillis
protected int logConnectionTimeout
protected int bufferSize
protected PluginContext context
| Constructor Detail |
|---|
public THL()
| Method Detail |
|---|
public java.lang.String getName()
Store
getName in interface Storepublic void setName(java.lang.String name)
Store
setName in interface Storepublic java.lang.String getStorageListenerUri()
public void setStorageListenerUri(java.lang.String storageListenerUri)
public java.lang.String getUrl()
public void setUrl(java.lang.String url)
public void setVendor(java.lang.String vendor)
public java.lang.String getUser()
public void setUser(java.lang.String user)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public int getResetPeriod()
public void setResetPeriod(int resetPeriod)
public void setLogDir(java.lang.String logDir)
logDir - The logDir to set.public void setLogFileSize(int logFileSize)
logFileSize - The logFileSize to set.public void setDoChecksum(boolean doChecksum)
doChecksum - If true use checksumspublic void setEventSerializer(java.lang.String eventSerializer)
public void setLogFileRetention(java.lang.String logFileRetention)
public void setLogConnectionTimeout(int logConnectionTimeout)
public void setBufferSize(int bufferSize)
public void setFlushIntervalMillis(long flushIntervalMillis)
public void setFsyncOnFlush(boolean fsyncOnFlush)
public void setReadOnly(java.lang.String ro)
public void setStopOnDBError(boolean stopOnDBErr)
public boolean getStopOnDBError()
public boolean isLogConsistencyCheck()
public void setLogConsistencyCheck(boolean checkRecoveredMasterLog)
public long getMaxStoredSeqno()
getMaxStoredSeqno in interface Storepublic long getMinStoredSeqno()
getMinStoredSeqno in interface Storepublic void updateActiveSeqno(long activeSeqno)
public void configure(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
configure in interface ReplicatorPluginReplicatorException - Thrown if configuration is incomplete or
fails
java.lang.InterruptedExceptionReplicatorPlugin.configure(com.continuent.tungsten.replicator.plugin.PluginContext)
public void prepare(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
prepare in interface ReplicatorPluginReplicatorException - Thrown if resource allocation fails
java.lang.InterruptedExceptionReplicatorPlugin.prepare(com.continuent.tungsten.replicator.plugin.PluginContext)
public void release(PluginContext context)
throws java.lang.InterruptedException,
ReplicatorException
release in interface ReplicatorPluginReplicatorException - Thrown if resource deallocation fails
java.lang.InterruptedExceptionReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)
public LogConnection connect(boolean readonly)
throws ReplicatorException
readonly - If true, this is a readonly connection
ReplicatorException
public void disconnect(LogConnection client)
throws ReplicatorException
client - a Disk log client to be disconnected
ReplicatorException
public void updateCommitSeqno(THLEvent thlEvent)
throws ReplicatorException
ReplicatorException - Thrown if update is unsuccessfulpublic boolean pollSeqno(long seqno)
public ReplDBMSHeader getLastAppliedEvent()
throws ReplicatorException,
java.lang.InterruptedException
java.lang.InterruptedException
ReplicatorException
public ReplDBMSHeader getLastLoggedEvent()
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedExceptionpublic TungstenProperties status()
status in interface StoreStore.status()
public java.util.LinkedList<ConnectorHandler> getClients()
throws ReplicatorException
ReplicatorException - If there's no listener.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||