Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.net
Class WrapperInvocationService

java.lang.Object
  extended by com.tangosol.net.WrapperService
      extended by com.tangosol.net.WrapperInvocationService

All Implemented Interfaces:
ClassLoaderAware, InvocationService, Controllable, Service

public class WrapperInvocationService
extends WrapperService
implements InvocationService

InvocationService implementation that delegates to a wrapped InvocationService instance.

Author:
jh 2010.03.17

Field Summary

 

Fields inherited from class com.tangosol.net.WrapperService
m_service

 

Fields inherited from interface com.tangosol.net.InvocationService
TYPE_DEFAULT, TYPE_REMOTE

 

Constructor Summary
WrapperInvocationService(InvocationService service)
          Create a new WrapperInvocationService that delegates to the given InvocationService instance.

 

Method Summary
 void execute(Invocable task, Set setMembers, InvocationObserver observer)
          Asynchronously invoke the specified task on each of the specified members.
 InvocationService getInvocationService()
          Return the wrapped InvocationService.
 Map query(Invocable task, Set setMembers)
          Synchronously invoke the specified task on each of the specified members.
 String toString()
          

 

Methods inherited from class com.tangosol.net.WrapperService
addMemberListener, addServiceListener, configure, getCluster, getContextClassLoader, getInfo, getSerializer, getService, getUserContext, isRunning, removeMemberListener, removeServiceListener, setContextClassLoader, setUserContext, shutdown, start, stop

 

Methods inherited from interface com.tangosol.net.Service
addMemberListener, getCluster, getInfo, getSerializer, getUserContext, removeMemberListener, setUserContext

 

Methods inherited from interface com.tangosol.util.Service
addServiceListener, removeServiceListener

 

Methods inherited from interface com.tangosol.util.Controllable
configure, isRunning, shutdown, start, stop

 

Methods inherited from interface com.tangosol.io.ClassLoaderAware
getContextClassLoader, setContextClassLoader

 

Constructor Detail

WrapperInvocationService

public WrapperInvocationService(InvocationService service)
Create a new WrapperInvocationService that delegates to the given InvocationService instance.
Parameters:
service - the InvocationService to wrap

Method Detail

execute

public void execute(Invocable task,
                    Set setMembers,
                    InvocationObserver observer)
Asynchronously invoke the specified task on each of the specified members. This method may return before the task is executed, or before it finishes executing, or after it finishes executing, or any of the above; however, it is expected that aggressive implementations will attempt to return as quickly as possible.
Specified by:
execute in interface InvocationService
Parameters:
task - the Invocable object to distribute to the specified members in order to be invoked on those members
setMembers - (optional) a set of cluster members to which the Invocable object will be distributed; if null, the Invocable object will be distributed to all cluster members that are running this service
observer - (optional) the InvocationObserver object that will receive notifications related to the Invocable object

query

public Map query(Invocable task,
                 Set setMembers)
Synchronously invoke the specified task on each of the specified members. This method will not return until the specified members have completed their processing, failed in their processing, or died trying.

Members that are specified but are not currently running the InvocationService will not invoke the specified Invocable object. Members that leave (gracefully or otherwise) before the invocation completes will not register a result, and the amount of processing that completed is indeterminate. Members that encounter an exception during invocation will not be retried; whatever result has been registered by that point by that member for that Invocable object will be returned. Specifically, the result for a given member will be not be present under the following conditions:

Specified by:
query in interface InvocationService
Parameters:
task - the Invocable object to distribute to the specified members in order to be invoked on those members
setMembers - (optional) a set of cluster members to which the Invocable object will be distributed; if null, the Invocable object will be distributed to all cluster members that are running this service
Returns:
a Map of result objects keyed by Member object

toString

public String toString()
Overrides:
toString in class WrapperService

getInvocationService

public InvocationService getInvocationService()
Return the wrapped InvocationService.
Returns:
the wrapped InvocationService

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.