Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net
Interface Invocable

All Superinterfaces:
java.lang.Runnable, java.io.Serializable
All Known Subinterfaces:
InvocableInOrder
All Known Implementing Classes:
AbstractHttpSessionCollection.ExitAgent, AbstractHttpSessionCollection.ExitTask, AbstractInvocable, LogThreadsHoldingLockAgent, PortalCacheProvider.FlushAgent, WorkManager.AbstractWork, WorkManager.CollectMembershipInfo, WorkManager.ReleaseWork, WorkManager.RequestStatus, WorkManager.ScheduleWork, WorkManager.SendFeedback

public interface Invocable
extends java.lang.Runnable, java.io.Serializable

The Invocable object is a cluster-portable object that can be invoked on any set of remote members and each can optionally register a return value for the invocation.

When an Invocable object is received for execution, the order of execution is:

Starting with Coherence 3.3 it's possible to control the task scheduling priority and timeout by also implementing PriorityTask interface.

Since:
Coherence 2.1
Author:
cp 2003-01-05

Method Summary
 java.lang.Object getResult()
          Determine the result from the invocation of this object.
 void init(InvocationService service)
          Called by the InvocationService exactly once on this Invocable object as part of its initialization.
 void run()
          Called exactly once by the InvocationService to invoke this Invocable object.

 

Method Detail

init

void init(InvocationService service)
Called by the InvocationService exactly once on this Invocable object as part of its initialization.

Note: implementations of the Invocable interface that store the service reference must do so only in a transient field.

Parameters:
service - the containing InvocationService

run

void run()
Called exactly once by the InvocationService to invoke this Invocable object.
Specified by:
run in interface java.lang.Runnable
See Also:
Thread.run()

getResult

java.lang.Object getResult()
Determine the result from the invocation of this object. This method is called by the InvocationService after the run method returns.
Returns:
the invocation result, if any

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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