Class DataElement
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.DataElement
A DataElement in the Enterprise Information System(TSeis).
- Version:
- 1.0, 06/06/02
- Author:
- Binod P.G
-
Constructor Summary
ConstructorsConstructorDescriptionDataElement(String key) If only key is inserted, this constructor will be used to construct theDataElementobject.DataElement(String key, String data) If key and value is inserted, this constructor will be used to construct theDataElementobject. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Get the key of theDataElementobject.Get the prepared data in theDataElementobject.intGet the status of the element.getValue()Get the data in theDataElementobject.intGet the version of the data.getXid()Get the xid used to do the prepare.voidprepare(DataElement value, Xid xid) Prepare the value for 2PC commit.voidsetStatus(int status) Sets the status of the object to the value provided.voidSet the value ofDataElementobject.voidUpdates the version of the element.
-
Constructor Details
-
DataElement
If key and value is inserted, this constructor will be used to construct theDataElementobject.- Parameters:
key- Key of theDataElementobject.data- Value of theDataElementobject.
-
DataElement
If only key is inserted, this constructor will be used to construct theDataElementobject.- Parameters:
key- Key of theDataElementobject.
-
-
Method Details
-
setStatus
public void setStatus(int status) Sets the status of the object to the value provided.- Parameters:
status- Status to be set.
-
getStatus
public int getStatus()Get the status of the element.- Returns:
- Current status of the
DataElementobject.
-
getKey
Get the key of theDataElementobject. -
getValue
Get the data in theDataElementobject. -
setValue
Set the value ofDataElementobject.- Parameters:
value- Value.
-
prepare
Prepare the value for 2PC commit.- Parameters:
value- Value to be prepared.
-
getPreparedValue
Get the prepared data in theDataElementobject. -
getVersion
public int getVersion()Get the version of the data.- Returns:
- version.
-
updateVersion
public void updateVersion()Updates the version of the element. -
getXid
Get the xid used to do the prepare.- Returns:
- Xid.
-