|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.base.search.SearchServiceManager
public class SearchServiceManager
A SearchServiceManager is responsible for requesting remote JVMs that are offering specific
services to run any requested task. This class uses a WorkManager
to locate the
servers offering the requested service.
Constructor Summary | |
---|---|
SearchServiceManager()
|
Method Summary | |
---|---|
static void |
doClusterTask(java.lang.String serviceName,
ServiceInvocation task)
Executes the requested task in all servers that are providing the specified service. |
static InvocationResult |
getResult(java.lang.String serviceName,
ServiceInvocation task)
Executes the requested task in only one server that is providing the specified service. |
static InvocationResult |
getResult(java.lang.String serviceName,
ServiceInvocation task,
commonj.work.WorkManager pinnedWorkManager)
Executes the requested task in the requested remoted JVM. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchServiceManager()
Method Detail |
---|
public static InvocationResult getResult(java.lang.String serviceName, ServiceInvocation task) throws commonj.work.WorkException, java.lang.InterruptedException
An InvocationResult
will be returned after the task has been executed in
the remote JVM. If an error occured in the remote JVM then an InvocationResult will also
be returned. Note that InvocationResult.getResult()
will throw an exception if there was an error executing the task in the remote server.
Otherwise, the result of the task is returned.
When no servers were found providing the requested service then a WorkException
will be thrown by this method.
serviceName
- the service offered by the server that will run the task.task
- the task to execute in a remote server.
commonj.work.WorkException
- if there is no server providing the requested service
java.lang.InterruptedException
- if there was an error waiting for the task to finish.public static InvocationResult getResult(java.lang.String serviceName, ServiceInvocation task, commonj.work.WorkManager pinnedWorkManager) throws java.lang.InterruptedException, commonj.work.WorkException
The preferred remote JVM should be obtained from a previous
getResult(String, com.jivesoftware.base.search.task.ServiceInvocation)
execution.
serviceName
- the service offered by the server that will run the task.task
- the task to execute in a remote server.pinnedWorkManager
- the preferred remote JVM.
commonj.work.WorkException
- if there is no server providing the requested service
java.lang.InterruptedException
- if there was an error waiting for the task to finish.public static void doClusterTask(java.lang.String serviceName, ServiceInvocation task)
serviceName
- the service offered by the server that will run the task.task
- the task to execute in a remote server.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |