Package io.higson.runtime.sync
Class ParamRuntimeWatcher
java.lang.Object
io.higson.runtime.sync.BaseWatcher
io.higson.runtime.sync.RuntimeWatcher
io.higson.runtime.sync.ParamRuntimeWatcher
- All Implemented Interfaces:
Runnable
- Author:
- przemek hertel
-
Field Summary
Fields inherited from class io.higson.runtime.sync.RuntimeWatcher
allCached, allFresh, eventListener, events, lastUpdate, timestampFields inherited from class io.higson.runtime.sync.BaseWatcher
config, log, running -
Constructor Summary
ConstructorsConstructorDescriptionParamRuntimeWatcher(MpParameterProvider provider, PreparedParamCache indexCache) ParamRuntimeWatcher(MpParameterProvider provider, PreparedParamCache indexCache, DevModeProvider devModeProvider, SessionDao sessionDao) ParamRuntimeWatcher(MpParameterProvider provider, PreparedParamCache indexCache, DevModeProvider devModeProvider, SessionDao sessionDao, Reloader reloader) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoWatch()get all cached elementsgets all synchronized components from specific tablereturns type that watcher is monitoringgets largest last update sync dateprotected Stringvoidinvalidate(int id) removes element in cachevoidreload(int id) the implementation makes the decision whether the supplied element (id) should be reloaded or notMethods inherited from class io.higson.runtime.sync.RuntimeWatcher
checkPossibleModification, possibleModification, setEventListenerMethods inherited from class io.higson.runtime.sync.BaseWatcher
getConfig, initWatcher, isRunning, print, print, run, setConfig, start, stop, watch
-
Constructor Details
-
ParamRuntimeWatcher
public ParamRuntimeWatcher(MpParameterProvider provider, PreparedParamCache indexCache, DevModeProvider devModeProvider, SessionDao sessionDao, Reloader reloader) -
ParamRuntimeWatcher
public ParamRuntimeWatcher(MpParameterProvider provider, PreparedParamCache indexCache, DevModeProvider devModeProvider, SessionDao sessionDao) -
ParamRuntimeWatcher
-
-
Method Details
-
getWatcherName
- Specified by:
getWatcherNamein classBaseWatcher
-
doWatch
public void doWatch()- Overrides:
doWatchin classRuntimeWatcher
-
getLastUpdate
Description copied from class:RuntimeWatchergets largest last update sync date- Specified by:
getLastUpdatein classRuntimeWatcher- Returns:
- largest lastUpdate Date
-
getAllLastUpdates
Description copied from class:RuntimeWatchergets all synchronized components from specific table- Specified by:
getAllLastUpdatesin classRuntimeWatcher- Returns:
- list of
Trackablecomponents - See Also:
-
getAllCached
Description copied from class:RuntimeWatcherget all cached elements- Specified by:
getAllCachedin classRuntimeWatcher- Returns:
- all cached objects
-
invalidate
public void invalidate(int id) Description copied from class:RuntimeWatcherremoves element in cache- Specified by:
invalidatein classRuntimeWatcher- Parameters:
id- of element to remove
-
reload
public void reload(int id) Description copied from class:RuntimeWatcherthe implementation makes the decision whether the supplied element (id) should be reloaded or not- Specified by:
reloadin classRuntimeWatcher- Parameters:
id- of element whose change was detected
-
getElementType
Description copied from class:RuntimeWatcherreturns type that watcher is monitoring- Specified by:
getElementTypein classRuntimeWatcher- Returns:
- ElementType object
- See Also:
-