Constructor and Description |
---|
SyncWorker(String workerName,
CacheMangerOperation cacheMangerOperation)
creates the sync worker
|
Modifier and Type | Method and Description |
---|---|
void |
collectAllCacheRecords()
the method collects all the records from cache except the component
itself
|
void |
run()
the method collects all the resources/services/products from graph and
checks if the component representing them in the cache is valid logic: if
the record is present in the graph but not in cache -> create a job that
will update the record oin cache if the timestamp of the record in cache
is older than the timestamp on the graph -> create a job that will update
the record oin cache otherwise no update is required
|
void |
shutDown()
the method sets the shutdown flag, when set the worker will stop it's
execution as soon as possible with out completing its work
|
public SyncWorker(String workerName, CacheMangerOperation cacheMangerOperation)
workerName
- the name of the workercacheMangerOperation
- responsible for all persistence's operations to graph and the
cachepublic void run()
public void collectAllCacheRecords()
Copyright © 2017. All rights reserved.