javamath.server.store
Class HashStore

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--javamath.server.store.HashStore
All Implemented Interfaces:
java.rmi.Remote, java.io.Serializable, Store

public class HashStore
extends java.rmi.server.UnicastRemoteObject
implements Store

HashStore is an implementation of Store which is a remote object in which to store (key,val) pairs. Optional arguments: timeout and frequency determine a finite lifespan for unused objects: timeout -- the number of seconds since last access before an object may be cleaned up. frequency -- number of puts between cleanups. The object is created and bound to a name by running the script javamath/src/server/store/bin/runstore

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
HashStore()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Retrieve the object associated with key.
static void main(java.lang.String[] args)
          The object is created and bound to a name by running the script javamath/src/server/store/bin/runstore with optional arguments [timeout frequency] in case the objects are to expire after a period of being unused.
 void put(java.lang.Object key, java.lang.Object value)
          Unlike the put in collections, this is void in order to minimize network overhead.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashStore

public HashStore()
          throws java.rmi.RemoteException
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value)
Unlike the put in collections, this is void in order to minimize network overhead.
Specified by:
put in interface Store

get

public java.lang.Object get(java.lang.Object key)
Retrieve the object associated with key.
Specified by:
get in interface Store

main

public static void main(java.lang.String[] args)
The object is created and bound to a name by running the script javamath/src/server/store/bin/runstore with optional arguments [timeout frequency] in case the objects are to expire after a period of being unused.