mandala.jacob.impl
Class ActiveMapImpl

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bymandala.jacob.impl.ActiveMapImpl
All Implemented Interfaces:
ActiveMap, java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ActiveMapImpl
extends java.util.HashMap
implements ActiveMap

ActiveMap implementation.

This implementation uses the AsynchronousPolicy interface providing customization of the reflexive asynchronous method invocation implementation.

Version:
$Revision: 1.13 $
Author:
eipi
See Also:
ActiveMap, AsynchronousPolicy, Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  AsynchronousPolicy policy
          The method policy.
 
Constructor Summary
ActiveMapImpl(AsynchronousPolicy policy)
           
ActiveMapImpl(int initialCapacity, AsynchronousPolicy policy)
           
ActiveMapImpl(int initialCapacity, float initialLoadFactor, AsynchronousPolicy policy)
           
ActiveMapImpl(java.util.Map map, AsynchronousPolicy policy)
           
 
Method Summary
 Cancelable call(java.lang.Object key, FutureServer future)
          Allows objects to do an asynchronous call on a method of the object associated with the given key.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

policy

protected final AsynchronousPolicy policy

The method policy.

See Also:
AsynchronousPolicy
Constructor Detail

ActiveMapImpl

public ActiveMapImpl(AsynchronousPolicy policy)

ActiveMapImpl

public ActiveMapImpl(int initialCapacity,
                     float initialLoadFactor,
                     AsynchronousPolicy policy)
              throws java.lang.IllegalArgumentException

ActiveMapImpl

public ActiveMapImpl(int initialCapacity,
                     AsynchronousPolicy policy)
              throws java.lang.IllegalArgumentException

ActiveMapImpl

public ActiveMapImpl(java.util.Map map,
                     AsynchronousPolicy policy)
Method Detail

call

public Cancelable call(java.lang.Object key,
                       FutureServer future)
Description copied from interface: ActiveMap

Allows objects to do an asynchronous call on a method of the object associated with the given key.

Invokes the method returned by futureServer.getMethod() on the object maps to the specified key (if it exists). The futureServer object is also used to sets the result once the method returns either normally or abruptly (exception) with the method futureServer.setResult()

The futureServer object given is used as specified in MethodInvoker.run()

Specified by:
call in interface ActiveMap
Parameters:
key - The key associated with the stored object.
future - A FutureServer object.
Returns:
the object you may used for cancelation
See Also:
FutureServer, MethodInvoker


Mandala help mailing list