public interface ModificationTracker extends SessionTaskDispatcher, ExclusiveSessionProvider
The pro tracker maintains its own session. The application can request an exclusive use of this session for a (short) period of time and release it afterwards.
| Modifier and Type | Method and Description |
|---|---|
void |
addModificationListener(ModificationListener listener)
Adds a modification listener.
|
void |
addShutdownRunnable(Runnable runnable)
Registers a pure runnable to be executed if the pdo tracker is terminated
due to severe errors.
|
long |
countModification(Session session,
String name)
Counts the modification for a given name.
Used to trigger modification events. |
static ModificationTracker |
getInstance()
The tracker singleton.
|
long |
getSerial(Class<?> clazz)
Gets the serial for a given class.
|
long |
getSerial(String name)
Gets the serial for a given modification name.
|
void |
invalidate()
Invalidates the tracker.
Forces the tracking info to be rebuilt. |
boolean |
removeModificationListener(ModificationListener listener)
Removes a modification listener.
|
boolean |
removeShutdownRunnable(Runnable runnable)
Unregisters a shutdown runnable.
|
getSession, isSessionClosedOnTermination, isSessionKeptAlive, setSession, setSessionClosedOnTermination, setSessionKeptAliveaddTask, addTaskAndWait, addTaskListener, getAllTasks, getDeadInterval, getQueueSize, getShutdownIdleTimeout, getSleepInterval, getTask, isAlive, isInstanceOfTaskPending, isQueueEmpty, isTaskPending, isUsingMutexLocking, lock, removeTask, removeTaskListener, setDeadInterval, setShutdownIdleTimeout, setSleepInterval, setUsingMutexLocking, start, toDiagnosticString, unlock, waitForTaskisTerminationRequested, requestTermination, terminatereleaseSession, requestSessionstatic ModificationTracker getInstance()
void addModificationListener(ModificationListener listener)
listener - the listener to addboolean removeModificationListener(ModificationListener listener)
listener - to removelong countModification(Session session, String name)
session - the session persisting the modification, null if threadlocal sessionname - a unique name to track modificationsvoid addShutdownRunnable(Runnable runnable)
runnable - the runnableboolean removeShutdownRunnable(Runnable runnable)
runnable - the runnablelong getSerial(Class<?> clazz)
clazz - the tracked classlong getSerial(String name)
name - the modification namevoid invalidate()
Tentackle - distributed, domain- and model-driven