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 theDataElement
object.DataElement
(String key, String data) If key and value is inserted, this constructor will be used to construct theDataElement
object. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Get the key of theDataElement
object.
Get the prepared data in theDataElement
object.int
Get the status of the element.getValue()
Get the data in theDataElement
object.int
Get the version of the data.getXid()
Get the xid used to do the prepare.void
prepare
(DataElement value, Xid xid) Prepare the value for 2PC commit.void
setStatus
(int status) Sets the status of the object to the value provided.void
Set the value ofDataElement
object.void
Updates the version of the element.
-
Constructor Details
-
DataElement
If key and value is inserted, this constructor will be used to construct theDataElement
object.- Parameters:
key
- Key of theDataElement
object.data
- Value of theDataElement
object.
-
DataElement
If only key is inserted, this constructor will be used to construct theDataElement
object.- Parameters:
key
- Key of theDataElement
object.
-
-
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
DataElement
object.
-
getKey
Get the key of theDataElement
object.
-
getValue
Get the data in theDataElement
object. -
setValue
Set the value ofDataElement
object.- Parameters:
value
- Value.
-
prepare
Prepare the value for 2PC commit.- Parameters:
value
- Value to be prepared.
-
getPreparedValue
Get the prepared data in theDataElement
object. -
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.
-