|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.log.LogConnection
public class LogConnection
Implements client operations on the log. Each individual client of the log must instantiate a separate connection. The client must be released after use to avoid resource leaks.
| Field Summary | |
|---|---|
static long |
FIRST
Symbol representing the first seqno in a new log. |
static long |
UNINITIALIZED
Simple representing base seqno of uninitialized log. |
| Method Summary | |
|---|---|
void |
commit()
Commit transactions stored in the log. |
void |
delete(java.lang.Long low,
java.lang.Long high)
Delete a range of events from the log. |
boolean |
isDone()
Returns true if connection is no longer in use. |
boolean |
isReadonly()
Returns true if this is a read-only client. |
THLEvent |
next()
Convenience method to return the next event with blocking enabled. |
THLEvent |
next(boolean block)
Returns the next event in the log. |
void |
release()
Releases the client connection. |
void |
releaseInternal()
Releases the client connection. |
void |
rollback()
Rollback transactions stored in the log. |
boolean |
seek(long seqno)
Positions cursor on first fragment of a specific event. |
boolean |
seek(long seqno,
short fragno)
Finds a specific THLEvent and position client cursor on the event. |
boolean |
seek(java.lang.String name)
Opens a log file and positions client cursor on the event. |
void |
setLogRotateMillis(int logRotateMillis)
Sets the local connection value for reading a new file after a log rotation. |
void |
setReadFilter(LogEventReadFilter readFilter)
Sets the read filter, which determines whether events are fully deserialized on read. |
void |
setTimeoutMillis(int timeoutMillis)
Sets the timeout in milliseconds for blocking reads on this connection. |
void |
store(THLEvent event,
boolean commit)
Store a THL event at the end of the log. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static long UNINITIALIZED
public static long FIRST
| Method Detail |
|---|
public boolean isReadonly()
public void setReadFilter(LogEventReadFilter readFilter)
public void setTimeoutMillis(int timeoutMillis)
public void setLogRotateMillis(int logRotateMillis)
public void release()
public void releaseInternal()
public boolean isDone()
public boolean seek(long seqno,
short fragno)
throws ReplicatorException,
java.lang.InterruptedException
seqno - Desired sequence numberfragno - Desired fragment
ReplicatorException - thrown if log cannot be read
java.lang.InterruptedException
public boolean seek(long seqno)
throws ReplicatorException,
java.lang.InterruptedException
seqno - Desired sequence number
ReplicatorException - thrown if log cannot be read
java.lang.InterruptedException
public boolean seek(java.lang.String name)
throws ReplicatorException,
java.io.IOException,
java.lang.InterruptedException
name - The short name of a current log file
ReplicatorException - Thrown if the log cannot be read
java.io.IOException - Thrown if file cannot be found
java.lang.InterruptedException
public THLEvent next(boolean block)
throws ReplicatorException,
java.lang.InterruptedException
block - If true, read blocks until next event is available
ReplicatorException
java.lang.InterruptedException
public THLEvent next()
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
public void store(THLEvent event,
boolean commit)
throws ReplicatorException,
java.lang.InterruptedException
event - THLEvent to storecommit - If true, flush to storage
ReplicatorException
java.lang.InterruptedException
public void commit()
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
public void rollback()
throws ReplicatorException
ReplicatorException
public void delete(java.lang.Long low,
java.lang.Long high)
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||