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 voidreload(int id) the implementation makes the decision whether the supplied element (id) should be reloaded or notvoidsetEventListener(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
-
reload
public abstract void reload(int id) the implementation makes the decision whether the supplied element (id) should be reloaded or not- Parameters:
id- of element whose change was detected
-
getElementType
returns type that watcher is monitoring- Returns:
- ElementType object
- See Also:
-