|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.data.store.AbstractDataStore
com.sun.sgs.impl.service.data.store.net.DataStoreClient
public final class DataStoreClient
Provides an implementation of DataStore by communicating over the
network to an implementation of DataStoreServer, and optionally runs
the server.
The constructor supports the following properties:
com.sun.sgs.impl.service.data.store.net.max.txn.timeout
600000
0.
DataStoreServerImpl, using the properties provided
to this instance's constructor.
com.sun.sgs.impl.service.data.store.net.server.host
com.sun.sgs.server.host
property, if present, or localhost if this node is starting the
server.
DataStoreServer.
com.sun.sgs.impl.service.data.store.net.server.port
44530
DataStoreServer. This value must be no less than 0 and no
greater than 65535. The value 0 can only be specified
if the com.sun.sgs.node.type property is not appNode,
and means that an anonymous port will be chosen for running the
server.
This class uses the Logger named com.sun.sgs.impl.service.data.store.net.client to log information
at the following levels:
SEVERE - Problems starting the server
INFO - Starting the server
CONFIG - Constructor properties
FINE - Allocating object IDs
FINEST - Object operations
| Field Summary |
|---|
| Fields inherited from class com.sun.sgs.impl.service.data.store.AbstractDataStore |
|---|
abortLogger, logger, nameAccesses, objectAccesses |
| Constructor Summary | |
|---|---|
DataStoreClient(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
Creates an instance of this class configured with the specified properties and access coordinator. |
|
| Method Summary | |
|---|---|
protected void |
abortInternal(Transaction txn)
Performs the actual operation for abort. |
protected void |
commitInternal(Transaction txn)
Performs the actual operation for commit. |
protected long |
createObjectInternal(Transaction txn)
Performs the actual operation for createObject. |
protected BindingValue |
getBindingInternal(Transaction txn,
String name)
Performs the actual operation for getBinding. |
protected int |
getClassIdInternal(Transaction txn,
byte[] classInfo)
Performs the actual operation for getClassId. |
protected byte[] |
getClassInfoInternal(Transaction txn,
int classId)
Performs the actual operation for getClassInfo. |
protected long |
getLocalNodeIdInternal()
Performs the actual operation for getLocalNodeId. |
protected byte[] |
getObjectInternal(Transaction txn,
long oid,
boolean forUpdate)
Performs the actual operation for getObject. |
protected RuntimeException |
handleException(Transaction txn,
Level level,
RuntimeException e,
String operation)
Performs any operations needed when an exception is going to be thrown, as well as allowing the implementation to replace the exception with a different one. |
protected void |
markForUpdateInternal(Transaction txn,
long oid)
Performs the actual operation for markForUpdate. |
protected String |
nextBoundNameInternal(Transaction txn,
String name)
Performs the actual operation for nextBoundName. |
protected long |
nextObjectIdInternal(Transaction txn,
long oid)
Performs the actual operation for nextObjectId. |
protected void |
prepareAndCommitInternal(Transaction txn)
Performs the actual operation for prepareAndCommit. |
protected boolean |
prepareInternal(Transaction txn)
Performs the actual operation for prepare. |
protected BindingValue |
removeBindingInternal(Transaction txn,
String name)
Performs the actual operation for removeBinding. |
protected void |
removeObjectInternal(Transaction txn,
long oid)
Performs the actual operation for removeObject. |
protected BindingValue |
setBindingInternal(Transaction txn,
String name,
long oid)
Performs the actual operation for setBinding. |
protected void |
setObjectInternal(Transaction txn,
long oid,
byte[] data)
Performs the actual operation for setObject. |
protected void |
setObjectsInternal(Transaction txn,
long[] oids,
byte[][] dataArray)
Performs the actual operation for setObjects. |
protected void |
shutdownInternal()
Performs the actual operation for shutdown. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class com.sun.sgs.impl.service.data.store.AbstractDataStore |
|---|
abort, checkOid, commit, createObject, getBinding, getClassId, getClassInfo, getLocalNodeId, getNameForAccess, getObject, getTypeName, markForUpdate, nextBoundName, nextObjectId, prepare, prepareAndCommit, ready, removeBinding, removeObject, reportNameAccess, reportObjectAccess, setBinding, setBindingDescription, setObject, setObjectDescription, setObjects, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataStoreClient(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
throws IOException,
NotBoundException
class
documentation for a list of supported properties.
properties - the properties for configuring this instancesystemRegistry - the registry of available system componentstxnProxy - the transaction proxy
IllegalArgumentException - if the com.sun.sgs.impl.service.data.store.net.server.host property
is not set, or if the value of the com.sun.sgs.impl.service.data.store.net.server.port property
is not a valid integer not less than 0 and not greater
than 65535
IOException - if a network problem occurs
NotBoundException - if the server is not found in the Java RMI
registry| Method Detail |
|---|
protected long getLocalNodeIdInternal()
getLocalNodeId.
getLocalNodeIdInternal in class AbstractDataStoreprotected long createObjectInternal(Transaction txn)
createObject.
createObjectInternal in class AbstractDataStoretxn - the transaction under which the operation should take place
protected void markForUpdateInternal(Transaction txn,
long oid)
markForUpdate.
markForUpdateInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoid - the object ID
protected byte[] getObjectInternal(Transaction txn,
long oid,
boolean forUpdate)
getObject.
getObjectInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoid - the object IDforUpdate - whether the caller intends to modify the object
protected void setObjectInternal(Transaction txn,
long oid,
byte[] data)
setObject.
setObjectInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoid - the object IDdata - the data
protected void setObjectsInternal(Transaction txn,
long[] oids,
byte[][] dataArray)
setObjects.
setObjectsInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoids - the object IDsdataArray - the associated data values
protected void removeObjectInternal(Transaction txn,
long oid)
removeObject.
removeObjectInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoid - the object ID
protected BindingValue getBindingInternal(Transaction txn,
String name)
getBinding. If
the name is bound, the return value contains the object ID that the name
is bound to and a next name of null. If the name is not bound,
the return value contains an object ID of -1 and the next name
found, which may be null.
getBindingInternal in class AbstractDataStoretxn - the transaction under which the operation should take placename - the name
protected BindingValue setBindingInternal(Transaction txn,
String name,
long oid)
setBinding. If
the name is bound, the return value contains an arbitrary non-negative
object ID and a next name of null. If the name is not bound,
the return value contains an object ID of -1 and the next name
found, which may be null.
setBindingInternal in class AbstractDataStoretxn - the transaction under which the operation should take placename - the nameoid - the object ID
protected BindingValue removeBindingInternal(Transaction txn,
String name)
removeBinding.
If the name is bound, the return value contains an arbitrary
non-negative object ID, otherwise it contains -1. In all cases,
the return value contains the next name found, which may be null.
removeBindingInternal in class AbstractDataStoretxn - the transaction under which the operation should take placename - the name
protected String nextBoundNameInternal(Transaction txn,
String name)
nextBoundName.
nextBoundNameInternal in class AbstractDataStoretxn - the transaction under which the operation should take placename - the name to search after, or null to start
at the beginning
name, or
null if there are no more bound namesprotected void shutdownInternal()
shutdown.
shutdownInternal in class AbstractDataStore
protected int getClassIdInternal(Transaction txn,
byte[] classInfo)
getClassId.
getClassIdInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeclassInfo - the class information
protected byte[] getClassInfoInternal(Transaction txn,
int classId)
throws ClassInfoNotFoundException
getClassInfo.
getClassInfoInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeclassId - the class ID
ClassInfoNotFoundException - if the ID is not found
protected long nextObjectIdInternal(Transaction txn,
long oid)
nextObjectId.
nextObjectIdInternal in class AbstractDataStoretxn - the transaction under which the operation should take placeoid - the identifier of the object to search after, or
-1 to request the first object
oid, or -1 if there are no more
objectsprotected boolean prepareInternal(Transaction txn)
prepare.
prepareInternal in class AbstractDataStoretxn - the transaction
true if this participant is read-only, otherwise falseprotected void commitInternal(Transaction txn)
commit.
commitInternal in class AbstractDataStoretxn - the transactionprotected void prepareAndCommitInternal(Transaction txn)
prepareAndCommit.
prepareAndCommitInternal in class AbstractDataStoretxn - the transactionprotected void abortInternal(Transaction txn)
abort.
abortInternal in class AbstractDataStoretxn - the transaction
protected RuntimeException handleException(Transaction txn,
Level level,
RuntimeException e,
String operation)
This implementation does logging, and aborts the transaction if it is
not null and the exception is a TransactionAbortedException.
In addition to the operations performed by the superclass, this
implementation includes the operation in the exception message for
NetworkExceptions, converts TransactionNotActiveException to TransactionTimeoutException if
the transaction timeout has passed, and notes in the information for the
transaction if the transaction has been aborted on the server side.
handleException in class AbstractDataStoretxn - the transaction or nulllevel - the logging levele - the exceptionoperation - a description of the operation being performed
public String toString()
toString in class Object
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||