Interface EffectiveNodeTypeCache
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
BitSetENTCacheImpl
,EffectiveNodeTypeCacheImpl
public interface EffectiveNodeTypeCache extends Cloneable
EffectiveNodeTypeCache
defines the interface for a cache for effective node types. Effective node types are addressed byEffectiveNodeTypeCache.Key
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EffectiveNodeTypeCache.Key
AnENTKey
uniquely identifies a combination (i.e.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 givenkey
is a super set, i.e.EffectiveNodeType
get(EffectiveNodeTypeCache.Key key)
Returns the effective node type for the given key ornull
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.
-
-
-
Method Detail
-
put
void put(EffectiveNodeType ent)
Puts an effective node type to the cache. The key is internally generated from the set of merged node types.- Parameters:
ent
- the effective node type to put to the cache
-
put
void put(EffectiveNodeTypeCache.Key key, EffectiveNodeType ent)
Puts an effective node type to the cache for the given key.- Parameters:
key
- the key for the effective node typeent
- the effective node type to put to the cache
-
contains
boolean contains(EffectiveNodeTypeCache.Key key)
Checks if the effective node type for the given key exists.- Parameters:
key
- the key to check- Returns:
true
if the effective node type is cached;false
otherwise.
-
get
EffectiveNodeType get(EffectiveNodeTypeCache.Key key)
Returns the effective node type for the given key ornull
if the desired node type is not cached.- Parameters:
key
- the key for the effective node type.- Returns:
- the effective node type or
null
-
getKey
EffectiveNodeTypeCache.Key getKey(Name[] ntNames)
Returns a key for an effective node type that consists of the given node type names.- Parameters:
ntNames
- the array of node type names for the effective node type- Returns:
- the key to an effective node type.
-
invalidate
void invalidate(Name name)
Removes all effective node types that are aggregated with the node type of the given name.- Parameters:
name
- the name of the node type.
-
clone
Object clone()
-
findBest
EffectiveNodeTypeCache.Key findBest(EffectiveNodeTypeCache.Key key)
Searches the best key k for which the givenkey
is a super set, i.e. for whichEffectiveNodeTypeCache.Key.contains(Key)
} returnstrue
. If an already cached effective node type matches the key it is returned.- Parameters:
key
- the key for which the subkey is to be searched- Returns:
- the best key or
null
if no key could be found.
-
-