Package org.eclipse.emf.cdo.util
Interface CDOUpdatable
- All Known Subinterfaces:
CDONet4jSession,CDOSession,CDOSession,CDOTransaction,CDOView,InternalCDOSession,InternalCDOTransaction,InternalCDOView
- All Known Implementing Classes:
CDOPushTransaction
public interface CDOUpdatable
Represents facilities that can receive
passive updates.- Since:
- 3.0
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time stamp of the last commit operation.booleanrunAfterUpdate(long updateTime, Runnable runnable) voidwaitForUpdate(long updateTime) Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred.booleanwaitForUpdate(long updateTime, long timeoutMillis) Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred or the given timeout has expired.
-
Field Details
-
NO_TIMEOUT
static final long NO_TIMEOUT- See Also:
-
-
Method Details
-
getLastUpdateTime
long getLastUpdateTime()Returns the time stamp of the last commit operation. May not be accurate ifpassive updatesare disabled. -
waitForUpdate
void waitForUpdate(long updateTime) Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred.- Parameters:
updateTime- the time stamp of the update to wait for in milliseconds since Unix epoch.
-
waitForUpdate
boolean waitForUpdate(long updateTime, long timeoutMillis) Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred or the given timeout has expired.- Parameters:
updateTime- the time stamp of the update to wait for in milliseconds since Unix epoch.timeoutMillis- the maximum number of milliseconds to wait for the update to occur, orNO_TIMEOUTto wait indefinitely.- Returns:
trueif the specified commit operation has occurred within the given timeout period,falseotherwise.
-
runAfterUpdate
- Since:
- 4.3
-