Class NotificationConnectionManager.NotificationConnectionExecutor
- java.lang.Object
-
- org.apache.manifoldcf.core.cachemanager.ExecutorBase
-
- org.apache.manifoldcf.crawler.notification.NotificationConnectionManager.NotificationConnectionExecutor
-
- All Implemented Interfaces:
ICacheExecutor
- Enclosing class:
- NotificationConnectionManager
protected static class NotificationConnectionManager.NotificationConnectionExecutor extends ExecutorBase
This is the executor object for locating notification connection objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap
returnMap
protected NotificationConnection[]
returnValues
protected NotificationConnectionManager
thisManager
-
Fields inherited from class org.apache.manifoldcf.core.cachemanager.ExecutorBase
_rcsid
-
-
Constructor Summary
Constructors Constructor Description NotificationConnectionExecutor(NotificationConnectionManager manager, NotificationConnectionManager.NotificationConnectionDescription[] objectDescriptions)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]
create(ICacheDescription[] objectDescriptions)
Create a set of new objects to operate on and cache.void
execute()
Perform the desired operation.void
exists(ICacheDescription objectDescription, java.lang.Object cachedObject)
Notify the implementing class of the existence of a cached version of the object.NotificationConnection[]
getResults()
Get the result.
-
-
-
Field Detail
-
thisManager
protected NotificationConnectionManager thisManager
-
returnValues
protected NotificationConnection[] returnValues
-
returnMap
protected java.util.HashMap returnMap
-
-
Constructor Detail
-
NotificationConnectionExecutor
public NotificationConnectionExecutor(NotificationConnectionManager manager, NotificationConnectionManager.NotificationConnectionDescription[] objectDescriptions)
Constructor.- Parameters:
manager
- is the NotificationManager.objectDescriptions
- are the object descriptions.
-
-
Method Detail
-
getResults
public NotificationConnection[] getResults()
Get the result.- Returns:
- the looked-up or read cached instances.
-
create
public java.lang.Object[] create(ICacheDescription[] objectDescriptions) throws ManifoldCFException
Create a set of new objects to operate on and cache. This method is called only if the specified object(s) are NOT available in the cache. The specified objects should be created and returned; if they are not created, it means that the execution cannot proceed, and the execute() method will not be called.- Parameters:
objectDescriptions
- is the set of unique identifier of the object.- Returns:
- the newly created objects to cache, or null, if any object cannot be created. The order of the returned objects must correspond to the order of the object descriptinos.
- Throws:
ManifoldCFException
-
exists
public void exists(ICacheDescription objectDescription, java.lang.Object cachedObject) throws ManifoldCFException
Notify the implementing class of the existence of a cached version of the object. The object is passed to this method so that the execute() method below will have it available to operate on. This method is also called for all objects that are freshly created as well.- Parameters:
objectDescription
- is the unique identifier of the object.cachedObject
- is the cached object.- Throws:
ManifoldCFException
-
execute
public void execute() throws ManifoldCFException
Perform the desired operation. This method is called after either createGetObject() or exists() is called for every requested object.- Throws:
ManifoldCFException
-
-