Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.coherence.commonj
Class WorkManager.RemoteWorkManager

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.coherence.commonj.WorkManager.RemoteWorkManager

All Implemented Interfaces:
commonj.work.WorkManager
Enclosing class:
WorkManager

protected class WorkManager.RemoteWorkManager
extends Base
implements commonj.work.WorkManager

RemoteWorkManager is a delegating WorkManager wrapper.


Field Summary
protected  Member m_memberPinned
          The service Member this RemoteWorkManager is pinned to.

 

Fields inherited from interface commonj.work.WorkManager
IMMEDIATE, INDEFINITE

 

Constructor Summary
WorkManager.RemoteWorkManager(Member memberPinned)
           

 

Method Summary
 commonj.work.WorkItem schedule(commonj.work.Work work)
          Dispatches a Work asynchronously.
 commonj.work.WorkItem schedule(commonj.work.Work work, commonj.work.WorkListener workListener)
          Dispatches a Work asynchronously.
protected  commonj.work.WorkItem schedule(commonj.work.Work work, commonj.work.WorkListener workListener, Member member)
          Accepts a Work instance for processing at the specified Member.
 boolean waitForAll(Collection collWorkItems, long lTimeoutMillis)
           
 Collection waitForAny(Collection collWorkItems, long lTimeoutMillis)
           

 

Field Detail

m_memberPinned

protected Member m_memberPinned
The service Member this RemoteWorkManager is pinned to.

Constructor Detail

WorkManager.RemoteWorkManager

public WorkManager.RemoteWorkManager(Member memberPinned)

Method Detail

schedule

public commonj.work.WorkItem schedule(commonj.work.Work work)
                               throws commonj.work.WorkException,
                                      IllegalArgumentException
Dispatches a Work asynchronously. The work is dispatched and the method returns immediately. <p/> If a JVM that this pinned WorkManager represents has failed then a WorkRejectedException will be thrown even if the remote JVM restarts. The pinned WorkManager must be refreshed by using a normal WorkManager and then acquiring a new pinned WorkManager.
Specified by:
schedule in interface commonj.work.WorkManager
Parameters:
work - the Work to execute
Returns:
the WorkItem representing the asynchronous work; since the Work must be serializable, a RemoteWorkItem is always returned
Throws:
commonj.work.WorkException - thrown if queuing this up results in an exception
IllegalArgumentException

schedule

public commonj.work.WorkItem schedule(commonj.work.Work work,
                                      commonj.work.WorkListener workListener)
                               throws commonj.work.WorkException,
                                      IllegalArgumentException
Dispatches a Work asynchronously. The work is dispatched and the method returns immediately. <p/> If a JVM that this pinned WorkManager represents has failed then a WorkRejectedException will be thrown even if the remote JVM restarts. The pinned WorkManager must be refreshed by using a normal WorkManager and then acquiring a new pinned WorkManager.
Specified by:
schedule in interface commonj.work.WorkManager
Parameters:
work - the Work to execute
Returns:
the WorkItem representing the asynchronous work; since the Work must be serializable, a RemoteWorkItem is always returned
Throws:
commonj.work.WorkException - thrown if queuing this up results in an exception
IllegalArgumentException

schedule

protected commonj.work.WorkItem schedule(commonj.work.Work work,
                                         commonj.work.WorkListener workListener,
                                         Member member)
                                  throws commonj.work.WorkException
Accepts a Work instance for processing at the specified Member.
Parameters:
work - the Work to execute
workListener - an optional WorkListener which is used to inform the application of the progress of a Work
member - the Member to execute the Work at
Returns:
a WorkItem representing scheduled Work
Throws:
commonj.work.WorkException - thrown if queuing this up results in an exception

waitForAll

public boolean waitForAll(Collection collWorkItems,
                          long lTimeoutMillis)
                   throws InterruptedException,
                          IllegalArgumentException
Specified by:
waitForAll in interface commonj.work.WorkManager
Throws:
InterruptedException
IllegalArgumentException
See Also:
WorkManager.waitForAll(java.util.Collection, long)

waitForAny

public Collection waitForAny(Collection collWorkItems,
                             long lTimeoutMillis)
                      throws InterruptedException,
                             IllegalArgumentException
Specified by:
waitForAny in interface commonj.work.WorkManager
Throws:
InterruptedException
IllegalArgumentException
See Also:
WorkManager.waitForAny(java.util.Collection, long)

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.