com.javageeks.client
Class RemoteStorageClient
java.lang.Object
|
+--com.javageeks.client.RemoteStorageClient
- All Implemented Interfaces:
- java.io.Serializable
- public class RemoteStorageClient
- extends java.lang.Object
- implements java.io.Serializable
RemoteStorageClient
- See Also:
- Serialized Form
Constructor Summary |
RemoteStorageClient(java.lang.String ID,
java.lang.String host,
int port)
Constructor. |
Method Summary |
java.lang.Object |
checkIn(java.lang.String objName,
java.lang.Object obj)
Stores the object obj under the name
objName , but only if the object is either
checked out to this client, or not already in the system. |
java.lang.Object |
checkOut(java.lang.String objName)
Retrieves the object by name and locks it for exclusive
modification by this client. |
boolean |
diff(java.lang.String objName,
java.lang.Object obj)
Compare the object stored in the system under the name
objName to the object passed in obj |
java.lang.Object |
get(java.lang.String objName)
Retrieves a "read-only" (that is, you don't own the lock on
this object) object by name. |
static void |
main(java.lang.String[] args)
Test driver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteStorageClient
public RemoteStorageClient(java.lang.String ID,
java.lang.String host,
int port)
- Constructor.
get
public java.lang.Object get(java.lang.String objName)
throws java.lang.Exception
- Retrieves a "read-only" (that is, you don't own the lock on
this object) object by name.
checkOut
public java.lang.Object checkOut(java.lang.String objName)
throws java.lang.Exception
- Retrieves the object by name and locks it for exclusive
modification by this client.
checkIn
public java.lang.Object checkIn(java.lang.String objName,
java.lang.Object obj)
throws java.lang.Exception
- Stores the object
obj
under the name
objName
, but only if the object is either
checked out to this client, or not already in the system.
diff
public boolean diff(java.lang.String objName,
java.lang.Object obj)
throws java.lang.Exception
- Compare the object stored in the system under the name
objName
to the object passed in obj
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Test driver