Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.coherence.commonj
Class WorkManager.RemoteWorkManager

    java.lang.Object
      com.tangosol.util.Base
          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(java.util.Collection collWorkItems, long lTimeoutMillis)`
`java.util.Collection` | `waitForAny(java.util.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,
                                          java.lang.IllegalArgumentException

  Dispatches a Work asynchronously. The work is dispatched and the method returns immediately.

  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
    `java.lang.IllegalArgumentException`

### schedule

    public commonj.work.WorkItem schedule(commonj.work.Work work,
                                          commonj.work.WorkListener workListener)
                                   throws commonj.work.WorkException,
                                          java.lang.IllegalArgumentException

  Dispatches a Work asynchronously. The work is dispatched and the method returns immediately.

  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
    `java.lang.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(java.util.Collection collWorkItems,
                              long lTimeoutMillis)
                       throws java.lang.InterruptedException,
                              java.lang.IllegalArgumentException

  Specified by:
    `waitForAll` in interface `commonj.work.WorkManager`
  Throws:
    `java.lang.InterruptedException`
    `java.lang.IllegalArgumentException`
  See Also:
    `WorkManager.waitForAll(java.util.Collection, long)`

### waitForAny

    public java.util.Collection waitForAny(java.util.Collection collWorkItems,
                                           long lTimeoutMillis)
                                    throws java.lang.InterruptedException,
                                           java.lang.IllegalArgumentException

  Specified by:
    `waitForAny` in interface `commonj.work.WorkManager`
  Throws:
    `java.lang.InterruptedException`
    `java.lang.IllegalArgumentException`
  See Also:
    `WorkManager.waitForAny(java.util.Collection, long)`

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.