|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IStoreCommitCompletionEvent
Represents the event notifying the completion of a commit operation.
Method Summary | |
---|---|
IStoreCommitCompletionEvent |
complete(boolean sync)
Set commit as complete. |
IStoreCommitCompletionStatus |
getCompletionStatus()
Get the commit completion status |
boolean |
getDispatch()
Get whether completion dispatch has been switched on. |
boolean |
getNotify()
Get whether completion notification has been switched on. |
long |
getPostWireTs()
Get the commit post-wire time. |
long |
getPreWireTs()
Get the commit pre-wire time. |
long |
getStartTs()
Get the commit start time. |
boolean |
isComplete()
Get whether the commit operation has completed. |
IStoreCommitCompletionEvent |
setDispatch(boolean val)
Set whether the completion event should be dispatched to the user event handler. |
IStoreCommitCompletionEvent |
setNotify(boolean val)
Set whether the user should be notified on commit completion. |
void |
setPostWireTs(long ts)
Set the commit post-wire time. |
void |
setPreWireTs(long ts)
Set the commit pre-wire time. |
void |
setStartTs(long ts)
Set the commit start time. |
void |
waitForCompletion()
Wait for completion of the commit. |
boolean |
wasSyncComplete()
Get whether the commit operation completed synchronously. |
Methods inherited from interface com.neeve.ods.IStoreEvent |
---|
getSource |
Methods inherited from interface com.neeve.event.IEvent |
---|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getRemainingTime, getScheduledTime, getType, isEndOfBatch, isHandled, owners, setAcknowledger, setAttachment, setDelay, setEndOfBatch, setHandled, setSource |
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker |
---|
referenceTracker |
Method Detail |
---|
IStoreCommitCompletionEvent setNotify(boolean val)
val
- Specify true for notification to be switched on and false
for notification to be switched off.
By default, upon completion of the commit operation, the completion
event is dispatched to the user through its registered event handler.
The user can use this method to request to be additionally notified of
the completion. The notification mechanism enables the user to block
and wait for commit completion. To block and wait, the user should
invoke this indicating interest in being notified and then invoke
waitForCompletion()
to wait for the commit to complete. When
the commit completes, the threads blocked in waitForCompletion()
will be woken up.
The default behavior is for completion notification to be switched off
and completion dispatch to be switched on. Enabling or disabling
completion notifications does not affect completion dispatch behavior.
That is controlled by setDispatch(boolean)
boolean getNotify()
IStoreCommitCompletionEvent setDispatch(boolean val)
val
- Specify true for dispatch to be switched on and false
for dispatch to be switched off.By default, upon completion of the commit operation, the completion event is dispatched to the user through its registered event handler. The user can use this method to block the dispatch of the event to the event handler.
The default behavior is for completion notification to be switched off
and completion dispatch to be switched on. Enabling or disabling
dispatch notifications does not affect completion notification behavior.
That is controlled by setNotify(boolean)
boolean getDispatch()
IStoreCommitCompletionEvent complete(boolean sync)
Note: This method should not be invoked by the user. It is intended for use by the ODS runtime to mark a commit as complete.
void waitForCompletion() throws InterruptedException
InterruptedException
The user should invoke this method to wait for the completion of
the commit operation associated with this event. Thread waiting
on this call are woken up when the commit operation completes (if
the user has switched on completion notification via setNotify(boolean)
)
Threads invoking this method after completion of the commit will
return immediately irrespective of whether completion notification
is switched on or not.
boolean isComplete()
This method polls for whether the commit operation has completed.
boolean wasSyncComplete()
IStoreCommitCompletionStatus getCompletionStatus()
This method returns the completion status of a commit operation. The
method returns null if and only if the commit has not yet completed
i.e. if and only if isComplete()
returns false.
void setStartTs(long ts)
long getStartTs()
void setPreWireTs(long ts)
The pre-wire time is the time at which the last entry in the commit's commit queue was serialized into a network buffer.
long getPreWireTs()
void setPostWireTs(long ts)
The post-wire time is the time at which the ack for the commit was deserialized from the network buffer
long getPostWireTs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |