|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.accessor.TAbstractAccessor
public abstract class TAbstractAccessor
This class provides a skeletal implementation of the TAccessor interface to minimize the effort required to implement a concrete accessor class. The abstract accessor allows multiple accessors to share their properties, so that different accessors, e.g. helper accessors and client accessor, can share theire properties, e.g. transaction parameters, invocation, ..
Field Summary | |
---|---|
protected boolean |
canBeCancelled
Boolean flag that indicates whether request sent to tamino can be canceled or not. |
protected java.util.List<java.lang.String> |
clientRequests
Application-Generated Unique Request Identifier |
protected int |
requestCounter
Request Counter. |
protected java.lang.String |
SGUAI
Server-Generated Unique Application Identifier |
Constructor Summary | |
---|---|
protected |
TAbstractAccessor()
Default Constructor. |
protected |
TAbstractAccessor(TAbstractAccessor abstractAccessor)
Initializes the accessor with the shared properties of a given TAbstractAccessor (shallow copy constructor). |
protected |
TAbstractAccessor(TAccessLocation accessLocation,
TInvocation invocation,
java.util.Locale locale)
Initializes the accessor with the given TAccessLocation and TInvocation instances. |
Method Summary | |
---|---|
void |
cancelRequests()
Cancels all requests issued using current accessor. |
protected java.lang.String |
getAccessCollection()
Gets the collection access location information. |
TAccessLocation |
getAccessLocation()
Returns a deep copy of the accessors properties. |
java.lang.String |
getApplicationName()
Returns Client Application Name. |
boolean |
getCanBeCancelled()
Returns true if request can be cancelled. |
protected TUri |
getDatabaseUri()
Returns the database uri instance of the invocation. |
protected TInvocation |
getInvocation()
Returns the TInvocation instance. |
java.util.Locale |
getLocale()
Gets the locale. |
TLockMode |
getLockMode()
Gets the lock mode. |
TLockwaitMode |
getLockwaitMode()
Gets the current lockwait mode A 'null' value represents the Tamino default. |
long |
getMaximumRequestDuration()
Gets the maximum request duration in seconds. Note: This method retrieves the servers default value, when this duration has not been set to a specific value (unequal to TConnection.DEFAULT_TIMEOUT)! |
void |
invalidate()
Invalidates the accessor. |
TInputStream |
invoke(TCommandStatement commandStatement)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database. |
TInputStream |
invoke(TCommandStatement commandStatement,
java.lang.String collection)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database. |
TInputStream |
invoke(TCommandStatement commandStatement,
java.lang.String collection,
java.lang.String doctype,
java.lang.String docname)
Invokes a specific command given by a TCommandStatement on an underlying Tamino database. |
void |
setAccessLocation(TAccessLocation accessLocation)
Sets the accessor's properties. |
void |
setApplicationName(java.lang.String name)
Sets Client Application Name. |
void |
setCanBeCancelled(boolean canBeCancelled)
Sets whether request can be canBeCancelled. |
void |
setInvocation(TInvocation invocation)
Set the TInvocation instance. |
void |
setLockMode(TLockMode lockMode)
Sets the lock mode. |
void |
setLockwaitMode(TLockwaitMode lockwaitMode)
Sets the lockwait mode for a transaction. |
void |
setMaximumRequestDuration(long maximumRequestDuration)
Sets the maximum request duration in seconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int requestCounter
protected boolean canBeCancelled
protected java.lang.String SGUAI
protected java.util.List<java.lang.String> clientRequests
Constructor Detail |
---|
protected TAbstractAccessor()
protected TAbstractAccessor(TAbstractAccessor abstractAccessor)
abstractAccessor
- The accessor to share the properties with.protected TAbstractAccessor(TAccessLocation accessLocation, TInvocation invocation, java.util.Locale locale)
accessLocation
- The access location, i.e. the collection nameinvocation
- The invocation to invoke command statements on.Method Detail |
---|
public void invalidate()
invalidate
in interface TInvalidatableAccessor
public void setAccessLocation(TAccessLocation accessLocation)
setAccessLocation
in interface TAccessor
accessLocation
- the TAccessLocation instance to be used by the accessor.public TAccessLocation getAccessLocation()
getAccessLocation
in interface TAccessor
protected TInvocation getInvocation()
public void setInvocation(TInvocation invocation)
TInvocation
- instance.protected TUri getDatabaseUri()
protected java.lang.String getAccessCollection()
public void setLockwaitMode(TLockwaitMode lockwaitMode)
setLockwaitMode
in interface TAccessor
lockwaitMode
- the lockwait mode to be set, 'null' for Tamino default.public TLockwaitMode getLockwaitMode()
getLockwaitMode
in interface TAccessor
public void setLockMode(TLockMode lockMode)
setLockMode
in interface TAccessor
lockMode
- the lock mode to be set, 'null' for Tamino default.public TLockMode getLockMode()
getLockMode
in interface TAccessor
public void setMaximumRequestDuration(long maximumRequestDuration)
setMaximumRequestDuration
in interface TAccessor
maximumRequestDuration
- the maximum request duration in seconds in seconds be set, TConnection.DEFAULT_TIMEOUT for Tamino default.public long getMaximumRequestDuration()
getMaximumRequestDuration
in interface TAccessor
public TInputStream invoke(TCommandStatement commandStatement) throws TInvocationException
commandStatement
- spcifies the concrete XML specific action that should be fullfilled.
TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public TInputStream invoke(TCommandStatement commandStatement, java.lang.String collection) throws TInvocationException
commandStatement
- spcifies the concrete action that should be fullfilled.collection
- is the collection of the Tamino DB where the object is contained in.
TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public TInputStream invoke(TCommandStatement commandStatement, java.lang.String collection, java.lang.String doctype, java.lang.String docname) throws TInvocationException
commandStatement
- spcifies the concrete action that should be fullfilled.collection
- is the collection of the Tamino DB where the object is contained in.doctype
- within a schema of a collection to which the statement is related.docname
- denotes the docname under which a specific document might be accessible.
TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.public void setApplicationName(java.lang.String name)
setApplicationName
in interface TAccessor
public java.lang.String getApplicationName()
getApplicationName
in interface TAccessor
public void cancelRequests() throws TAdminException
cancelRequests
in interface TAccessor
TAdminException
public void setCanBeCancelled(boolean canBeCancelled) throws TAdminException
setCanBeCancelled
in interface TAccessor
TAdminException
public boolean getCanBeCancelled()
getCanBeCancelled
in interface TAccessor
public java.util.Locale getLocale()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |