ibis.satin
Class SharedObject

java.lang.Object
  extended by ibis.satin.SharedObject
All Implemented Interfaces:
Serializable

public class SharedObject
extends Object
implements Serializable

A Satin shared object must be of a class that extends this SharedObject class. This class exports one method that actually marks the object as shared.

See Also:
Serialized Form

Method Summary
 void exportObject()
          This method is optional, and can be used after creating a shared object.
 String getObjectId()
           
 String getObjectIdAndSetNonlocal()
           
 boolean isUnshared()
          Returns true if the shared object is still local.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isUnshared

public final boolean isUnshared()
Returns true if the shared object is still local. Write operations that are done while the object is still local are not broadcasted. As soon as an invocation record is made with this object, or exportObject is called, the object is considered non-local.

Returns:
true if the object is still local.

exportObject

public void exportObject()
This method is optional, and can be used after creating a shared object. It allows Satin to immediately distribute a replica to all machines participating in the application. This way, machines won't have to ask for it later.


getObjectId

public final String getObjectId()

getObjectIdAndSetNonlocal

public final String getObjectIdAndSetNonlocal()


The Ibis project