GigaSpaces XAP 9.1 API

com.sun.jini.mahalo
Class StorableObject

java.lang.Object
  extended by com.sun.jini.mahalo.StorableObject
All Implemented Interfaces:
Serializable

public class StorableObject
extends Object
implements Serializable

This class holds a MarshalledObject that can be stored persistently. When you invoke get, the object is deserialized, its value cached in this object, and then returned. Subsequent calls to get return that value. This lets you store the object and hold it around, waiting until it is actually deserializable, since it may not be at any given time due to various factors, such as the codebase being unavailable.

Author:
Sun Microsystems, Inc.
See Also:
Serialized Form

Constructor Summary
StorableObject(Object obj)
          Create a StorableObject that will hold obj in a MarshalledObject.
 
Method Summary
 boolean equals(Object that)
           
 Object get()
          Return the Remote reference.
 int hashCode()
          Return the hashCode of the MarshalledObject.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorableObject

public StorableObject(Object obj)
               throws RemoteException
Create a StorableObject that will hold obj in a MarshalledObject.

Throws:
RemoteException
Method Detail

hashCode

public int hashCode()
Return the hashCode of the MarshalledObject.

Overrides:
hashCode in class Object

equals

public boolean equals(Object that)
Overrides:
equals in class Object

get

public Object get()
           throws RemoteException
Return the Remote reference. Deserialize the object if we don't already have an actual reference in hand.

Throws:
RemoteException - Problems re-establishing connection with remote object

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.