|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.services.cache.CacheIndex
Implements CacheIndexer used to apply an index definition on a given cache. Implements CacheListener so as to be informed of cache key remove events.
Constructor Summary | |
CacheIndex()
Constructor for CacheIndex. |
|
CacheIndex(Cache cache,
DataPacket structure)
Constructor for CacheIndex. |
|
CacheIndex(Cache cache,
java.lang.String indexDPName,
java.lang.String[] indexFieldNames)
Constructor for CacheIndex. |
|
CacheIndex(java.lang.String indexName)
Constructor for CacheIndex. |
Method Summary | |
void |
cacheChanged(CacheEvent event)
If a key is removed from the dataCache then it must also be removed from the indexCache. |
java.util.Collection |
get(java.lang.Object data)
This method will return a collection of keys into the dataCache that match the indexKey produced from the given data object. |
Cache |
getDataCache()
Returns the dataCache. |
java.lang.String |
getIndexDPName()
Returns the indexDPName. |
java.lang.String[] |
getIndexFieldNames()
Returns the indexFieldNames. |
java.lang.Object |
put(java.lang.Object key)
Adds a record to the index. |
void |
setDataCache(Cache dataCache)
Sets the dataCache. |
void |
setIndexDPName(java.lang.String indexDPName)
Sets the indexDPName. |
void |
setIndexFieldNames(java.lang.String[] indexFieldNames)
Sets the indexFieldNames. |
void |
setIndexName(java.lang.String indexName)
Given the indexName the index structure is determined and this CacheIndex instance is then configured. |
void |
setIndexStructure(DataPacket indexStructure)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheIndex()
public CacheIndex(Cache cache, DataPacket structure)
public CacheIndex(Cache cache, java.lang.String indexDPName, java.lang.String[] indexFieldNames)
public CacheIndex(java.lang.String indexName)
Method Detail |
public void setIndexName(java.lang.String indexName)
setIndexName
in interface CacheIndexer
indexName
- public void cacheChanged(CacheEvent event)
cacheChanged
in interface CacheListener
CacheListener.cacheChanged(CacheEvent)
public java.lang.Object put(java.lang.Object key)
put
in interface CacheIndexer
public java.util.Collection get(java.lang.Object data)
get
in interface CacheIndexer
public Cache getDataCache()
getDataCache
in interface CacheIndexer
public java.lang.String getIndexDPName()
getIndexDPName
in interface CacheIndexer
public java.lang.String[] getIndexFieldNames()
getIndexFieldNames
in interface CacheIndexer
public void setDataCache(Cache dataCache)
setDataCache
in interface CacheIndexer
dataCache
- The dataCache to setpublic void setIndexDPName(java.lang.String indexDPName)
setIndexDPName
in interface CacheIndexer
indexDPName
- The indexDPName to setpublic void setIndexFieldNames(java.lang.String[] indexFieldNames)
setIndexFieldNames
in interface CacheIndexer
indexFieldNames
- The indexFieldNames to setpublic void setIndexStructure(DataPacket indexStructure)
setIndexStructure
in interface CacheIndexer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |