Package io.higson.runtime.sync
Class RuntimeWatcher
java.lang.Object
io.higson.runtime.sync.BaseWatcher
io.higson.runtime.sync.RuntimeWatcher
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
FunctionRuntimeWatcher,ParamRuntimeWatcher
- Author:
- przemek hertel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddoWatch()get all cached elementsgets all synchronized components from specific tableabstract ElementTypereturns type that watcher is monitoringabstract Dategets largest last update sync dateabstract voidinvalidate(int id) removes element in cacheabstract voidinvalidateOrReload(int id) the implementation makes the decision whether the supplied element (id) should be: - only invalidated - invalidated and eagery reloaded - reloaded and hot-swappedvoidsetEventListener(WatcherEventListener listener) Methods inherited from class io.higson.runtime.sync.BaseWatcher
getConfig, isRunning, run, setConfig, start, stop
-
Constructor Details
-
RuntimeWatcher
public RuntimeWatcher()
-
-
Method Details
-
doWatch
public void doWatch() -
checkPossibleModification
public void checkPossibleModification() -
setEventListener
-
getLastUpdate
gets largest last update sync date- Returns:
- largest lastUpdate Date
-
getAllLastUpdates
gets all synchronized components from specific table -
getAllCached
get all cached elements- Returns:
- all cached objects
-
invalidate
public abstract void invalidate(int id) removes element in cache- Parameters:
id- of element to remove
-
invalidateOrReload
public abstract void invalidateOrReload(int id) the implementation makes the decision whether the supplied element (id) should be: - only invalidated - invalidated and eagery reloaded - reloaded and hot-swapped -
getElementType
returns type that watcher is monitoring- Returns:
- ElementType object
- See Also:
-