@Component(value="cacheManger-operation") public class CacheMangerOperation extends Object implements ICacheMangerOperation
Constructor and Description |
---|
CacheMangerOperation()
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
deleteComponentInCache(String componentId,
long timestamp,
NodeTypeEnum nodeTypeEnum) |
ComponentCache |
getComponentCache() |
TitanGenericDao |
getTitanGenericDao() |
void |
init()
the method checks in the cache is enabled, if it is, it initializes all
the workers according to the configuration values.
|
void |
overideComponentInCache(String componentId,
long timestamp,
NodeTypeEnum nodeTypeEnum) |
void |
shutDown()
the method shutdown's all the worker's.
|
void |
storeComponentInCache(Component component,
NodeTypeEnum nodeTypeEnum)
the method stores the given component in the cache
|
void |
updateComponentInCache(String componentId,
long timestamp,
NodeTypeEnum nodeTypeEnum)
the method creates a job to check it the given component is in the cach
and if so is it valid if the value in the cache is not valid it will be
updated.
|
@PostConstruct public void init()
public void updateComponentInCache(String componentId, long timestamp, NodeTypeEnum nodeTypeEnum)
updateComponentInCache
in interface ICacheMangerOperation
componentId
- the uid of the component we want to updatetimestamp
- the time of the component updatenodeTypeEnum
- the type of the component resource/service/productpublic void overideComponentInCache(String componentId, long timestamp, NodeTypeEnum nodeTypeEnum)
public void deleteComponentInCache(String componentId, long timestamp, NodeTypeEnum nodeTypeEnum)
public void storeComponentInCache(Component component, NodeTypeEnum nodeTypeEnum)
storeComponentInCache
in interface ICacheMangerOperation
component
- componet to store in cachenodeTypeEnum
- the type of the component we want to store@PreDestroy public void shutDown()
public TitanGenericDao getTitanGenericDao()
public ComponentCache getComponentCache()
Copyright © 2017. All rights reserved.