public class CachingManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
cacheSize
size of the cache
|
protected java.util.LinkedList<java.util.Map<java.lang.String,SignalInformation>> |
cachingData
current cache
|
Constructor and Description |
---|
CachingManager()
Creates a caching manager with a default caching size of 1.
|
CachingManager(int cacheSize)
Creates a caching manager with a given caching size.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(java.util.Map<java.lang.String,SignalInformation> data)
Puts data to the cache
|
protected void |
init(int cacheSize)
Changes the caching size and clears the cache.
|
java.util.Map<java.lang.String,SignalInformation> |
interpolateData()
Interpolates caching data.
|
boolean |
isCacheFull()
Checks if the cache is full.
|
void |
reset()
Clears the cache.
|
void |
setCacheSize(int cacheSize)
Sets the caching size.
|
protected java.util.LinkedList<java.util.Map<java.lang.String,SignalInformation>> cachingData
protected int cacheSize
public CachingManager()
public CachingManager(int cacheSize)
cacheSize
- caching sizeprotected void init(int cacheSize)
cacheSize
- public void reset()
public void setCacheSize(int cacheSize)
cacheSize
- caching sizepublic boolean isCacheFull()
public void addData(java.util.Map<java.lang.String,SignalInformation> data)
data
- data to be addedpublic java.util.Map<java.lang.String,SignalInformation> interpolateData()