Package com.ptc.windchill.esi.tgt
Class ESIDefaultTargetsCache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
com.ptc.windchill.esi.tgt.ESIDefaultTargetsCache
- All Implemented Interfaces:
Serializable,Remote,Unreferenced,wt.cache.CacheServer,wt.util.RemoteStub
A simple extension of CacheManager that provides for caching of distribution targets information. The cache mainly
stores information for the default distribution targets based on their context where they are marked as default. It
also stores derived attribute information for the targets that is used frequently and it is unlikely to be changed
for long period of time in the system.
Supported API: true
Extendable: false
- Distribution targets having Default For Context attribute value true are cached as follows: The cache holds object IDs of WTContainer objects as keys and Sets of ESITarget objects (that are default for the given context i.e. container) as values.
- Derived attribute information for the targets is stored as follows: The cache contains the object reference string for distribution target as key and value contains Map of name value pair of derived attributes for distribution target object instance.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
ConstructorsConstructorDescriptionTrivial constructor that simply invokes the parent's constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the input distribution target that is defined as default for context to the cache.voidaddToCache(ESITarget target) Adds the input distribution target to the cache.voidRemoves the input distribution target that was defined as default for context from the cache, if it is found.voidremoveFromCache(ESITarget target) Removes the input distribution target and related information from the cache, if it is found.voidupdateTargetInCache(ESITarget target) Adds the input distribution target to the cache.Methods inherited from class wt.cache.CacheManager
get, getDefaultName, getDefaultSize, isShutdown, put, putEntry, remove, removeEntry, replaceInstance, reset, shutdownInstance, update, updateEntryMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Constructor Details
-
ESIDefaultTargetsCache
Trivial constructor that simply invokes the parent's constructor.
Supported API: true- Throws:
RemoteException- , if the parent constructor threw this exception.
-
-
Method Details
-
removeFromCache
Removes the input distribution target and related information from the cache, if it is found.
Supported API: true- Parameters:
target- - Input distribution target to be removed from the cache.- See Also:
-
addToCache
Adds the input distribution target to the cache. When specified input target is a default for the context then adds this to context specific cache and caches other target specific information in Windchill cache. Note: API currently caches only some specific attributes in cache but not entire target object.
Supported API: true- Parameters:
target- Input distribution target to be added to the cache.- See Also:
-
removeContextDefaultTargetFromCache
Removes the input distribution target that was defined as default for context from the cache, if it is found. The method attempts to get the value collection using the object ID of the input target's container as the key and then removes the target from the value collection if the fetch was successful. Does nothing if the object ID of the input target's container does not exist as a key in the cache, or if the value collection does not have the input target.
Note: API does not check if the target is default for context or not. Caller should ensure that target is default for context.
Supported API: true- Parameters:
tgt- Input distribution target to be removed from the cache.
-
addContextDefaultTargetToCache
Adds the input distribution target that is defined as default for context to the cache. The method attempts to get the value collection using the object ID of the input target's container as the key and then adds the target to the value collection if the fetch was successful. Otherwise, it allocates for a HashSet, adds the input target to it and creates a new entry in the cache.
Note: API does not check if the target is default for context or not. Caller should ensure that target is default for context.
Supported API: true- Parameters:
tgt- Input distribution target to be added to the cache.
-
updateTargetInCache
Adds the input distribution target to the cache. When specified input target is a default for the context then adds this to context specific cache and caches other target specific information in Windchill cache.
Note: API currently caches only some specific attributes in cache but not entire target object.
Supported API: true- Parameters:
target- - Input distribution target to be updated to the cache.- See Also:
-