public class EffectiveNodeTypeCacheImpl extends Object implements EffectiveNodeTypeCache
EffectiveNodeTypeCache implementation that uses an array of
node type names as key for caching the effective node types.EffectiveNodeTypeCache.Key| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
contains(EffectiveNodeTypeCache.Key key)
Checks if the effective node type for the given key exists.
|
EffectiveNodeTypeCache.Key |
findBest(EffectiveNodeTypeCache.Key key)
Searches the best key k for which the given
key is a super
set, i.e. |
EffectiveNodeType |
get(EffectiveNodeTypeCache.Key key)
Returns the effective node type for the given key or
null if
the desired node type is not cached. |
EffectiveNodeTypeCache.Key |
getKey(Name[] ntNames)
Returns a key for an effective node type that consists of the given
node type names.
|
void |
invalidate(Name name)
Removes all effective node types that are aggregated with the node type
of the given name.
|
void |
put(EffectiveNodeType ent)
Puts an effective node type to the cache.
|
void |
put(EffectiveNodeTypeCache.Key key,
EffectiveNodeType ent)
Puts an effective node type to the cache for the given key.
|
String |
toString() |
public EffectiveNodeTypeCache.Key getKey(Name[] ntNames)
getKey in interface EffectiveNodeTypeCachentNames - the array of node type names for the effective node typepublic void put(EffectiveNodeType ent)
put in interface EffectiveNodeTypeCacheent - the effective node type to put to the cachepublic void put(EffectiveNodeTypeCache.Key key, EffectiveNodeType ent)
put in interface EffectiveNodeTypeCachekey - the key for the effective node typeent - the effective node type to put to the cachepublic boolean contains(EffectiveNodeTypeCache.Key key)
contains in interface EffectiveNodeTypeCachekey - the key to checktrue if the effective node type is cached;
false otherwise.public EffectiveNodeType get(EffectiveNodeTypeCache.Key key)
null if
the desired node type is not cached.get in interface EffectiveNodeTypeCachekey - the key for the effective node type.nullpublic void invalidate(Name name)
invalidate in interface EffectiveNodeTypeCachename - the name of the node type.public EffectiveNodeTypeCache.Key findBest(EffectiveNodeTypeCache.Key key)
key is a super
set, i.e. for which EffectiveNodeTypeCache.contains(Key)} returns
true. If an already cached effective node type matches the
key it is returned.findBest in interface EffectiveNodeTypeCachekey - the key for which the subkey is to be searchednull if no key could be found.public Object clone()
clone in interface EffectiveNodeTypeCacheclone in class ObjectCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.