java.lang.AutoCloseable
public interface CacheLoader
extends java.lang.AutoCloseable
Modifier and Type | Method | Description |
---|---|---|
java.util.Map<java.lang.String,RefreshPreference> |
getDatasetsToRefresh(java.util.Map<java.lang.String,java.lang.Object> userContexts) |
Responsible for getting new datasets at realtime through polling if refresh-on-event is enabled.
|
void |
init(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String cacheName) |
Perform tasks like allocating resources or acquiring connections etc.
|
java.lang.Object |
loadDatasetOnStartup(java.lang.String dataset) |
Responsible for loading of items on cache startup.
|
java.lang.Object |
refreshDataset(java.lang.String dataset,
java.lang.Object userContext) |
Responsible for refreshing of items.
|
void init(java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String cacheName) throws java.lang.Exception
parameters
- Startup parameters defined in the configuration.cacheName
- Cache name for which loader is called.java.lang.Exception
java.lang.Object loadDatasetOnStartup(java.lang.String dataset) throws java.lang.Exception
dataset
- dataset for which loader is called.java.lang.Exception
java.lang.Object refreshDataset(java.lang.String dataset, java.lang.Object userContext) throws java.lang.Exception
dataset
- dataset for which loader is called.userContext
- The usercontext associated with the specified dataset.java.lang.Exception
java.util.Map<java.lang.String,RefreshPreference> getDatasetsToRefresh(java.util.Map<java.lang.String,java.lang.Object> userContexts) throws java.lang.Exception
userContexts
- Map that contains the dataset and the associated user-context as key value pairs.java.lang.Exception