public interface CacheManager extends IOEventListener
Modifier and Type | Field and Description |
---|---|
static String |
RELATIONSHIP_ACTIVEPOOL |
static String |
RELATIONSHIP_REFERREDARTICLES |
static String |
RELATIONSHIP_ROLEKEEPERS_PREFIX |
static String |
RELATIONSHIP_SECTIONPOOL |
static String |
RELATIONSHIP_SHADOWS |
static String |
RELATIONSHIP_SUBSECTION |
Modifier and Type | Method and Description |
---|---|
void |
cacheObject(IOObject object)
Adds an object to the cache.
|
void |
cacheObjects(IOObject[] objects)
Adds an array of objects to the cache.
|
void |
cacheRelationship(IOHashKey source,
String type,
IOHashKey[] targets,
Map[] attributeSets)
Adds a set of relationsips to the cache.
|
void |
cacheRelationship(IOHashKey source,
String type,
IOHashKey target,
Map attributeSet)
Adds a simple relationship to the cache.
|
void |
dropLRUObjects()
Deprecated.
no replacement
|
void |
dropLRUObjects(int n)
Deprecated.
no replacement
|
boolean |
dropObject(IOHashKey object)
Remove an object from the cache.
|
int |
dropObjects(IOHashKey[] objects)
Remove an array of objects from the cache.
|
boolean |
dropRelationship(IOHashKey hashKey,
String relationship)
Removes the specified relation from cache.
|
Map |
getAttributeSet(IOHashKey key,
String relationship)
Retreives all attributes belongning to the specified relation.
|
Map[] |
getAttributeSets(IOHashKey key,
String relationship)
Retreives all attributes belongning to the specified relations.
|
IOObject |
getObject(IOHashKey key)
Retrieves the specified
IOObject from cache. |
IOObject[] |
getObjects(IOHashKey[] keys)
Deprecated.
|
IOHashKey |
getRelationship(IOHashKey key,
String relationship)
Retrieves a relation from cache that is of the specified type and belongs to the
IOObject
in question. |
IOHashKey[] |
getRelationships(IOHashKey key,
String relationship)
Retrieves all relations from cache that are of the specified type and belongs to the
IOObject
in question. |
handleEvent
static final String RELATIONSHIP_ACTIVEPOOL
static final String RELATIONSHIP_REFERREDARTICLES
static final String RELATIONSHIP_ROLEKEEPERS_PREFIX
static final String RELATIONSHIP_SECTIONPOOL
static final String RELATIONSHIP_SHADOWS
static final String RELATIONSHIP_SUBSECTION
void cacheObject(IOObject object)
object
- the object to addvoid cacheObjects(IOObject[] objects)
objects
- the objects to addvoid cacheRelationship(IOHashKey source, String type, IOHashKey target, Map attributeSet)
source
- the source part of the relation to addtype
- the type of relation to addtarget
- the target part of the relation to addattributeSet
- the attributes belonging to the relation to addvoid cacheRelationship(IOHashKey source, String type, IOHashKey[] targets, Map[] attributeSets)
source
- the source part of the relations to addtype
- the type of relations to addtargets
- the target part of the relations to addattributeSets
- the attributes belonging to the relations to addIOObject getObject(IOHashKey key)
IOObject
from cache.
If the requested object is in the cache, it is moved to the MRU end
and returned. Otherwise, null is returned.key
- the key to the object to getIOObject
if it exists, null otherwiseIOObject[] getObjects(IOHashKey[] keys)
IOObjects
from cache. It does an individual lookup
for each of the keys in the 'keys' parameter. The resulting
array is an array of the same length, where each element is null
or a reference to an IOObject, based on whether or not the object exists
in the cache.keys
- an array of keys to lookupIOHashKey getRelationship(IOHashKey key, String relationship)
IOObject
in question.key
- an IOHashKey
representation of the IOObject
to retrieve relations fromrelationship
- the type of relation to retrieveIOObject
in questionIOHashKey[] getRelationships(IOHashKey key, String relationship)
IOObject
in question.key
- an IOHashKey
representation of the IOObject
to retrieve relations fromrelationship
- the type of relation to retrieveIOObject
in questionMap getAttributeSet(IOHashKey key, String relationship)
key
- an IOHashKey
representation of the IOObject
to lookup relation byrelationship
- the type of relation to retrieve attributes fromMap
representation of attributesMap[] getAttributeSets(IOHashKey key, String relationship)
key
- an IOHashKey
representation of the IOObject
to lookup relation byrelationship
- the type of relation to retrieve attributes fromMap
representations of attributesboolean dropObject(IOHashKey object)
int dropObjects(IOHashKey[] objects)
objects
- the keys to the objects to dropboolean dropRelationship(IOHashKey hashKey, String relationship)
hashKey
- the relation to remove from cacherelationship
- the type of relation to remove from cachevoid dropLRUObjects(int n)
n
- the number of objects to dropvoid dropLRUObjects()
© 1998- 2018 Stibo DX