Class TSConnectionImpl
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl
- All Implemented Interfaces:
TSConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
void
close()
Closes this connection.void
commit()
Commits all the operations.void
Delete the key and value from Test Information System (TSEIS).void
Drops all data in the EIS.protected void
boolean
Get the auto-commt flag value.getConnection
(String user, char[] passwd) Get the data cache of the connection accumulated during a transaction.void
Insert a key and value in Test Information System (TSEIS).boolean
inUse()
boolean
lease()
readData()
Get all the data in the TSEis.Read the value for the key.void
rollback()
Rolls back all the operations.void
setAutoCommit
(boolean flag) Sets the auto-commit flag to the value passed in.void
Update the key and value in Test Information System (TSEIS).
-
Constructor Details
-
TSConnectionImpl
public TSConnectionImpl()
-
-
Method Details
-
getConnection
- Throws:
Exception
-
getConnection
- Throws:
Exception
-
lease
public boolean lease() -
expireLease
protected void expireLease() -
insert
Description copied from interface:TSConnection
Insert a key and value in Test Information System (TSEIS).- Specified by:
insert
in interfaceTSConnection
- Parameters:
key
- Key to insert.value
- value to insert.- Throws:
Exception
- If the key is already present in the EIS.
-
delete
Description copied from interface:TSConnection
Delete the key and value from Test Information System (TSEIS).- Specified by:
delete
in interfaceTSConnection
- Parameters:
str
- Key to delete.- Throws:
Exception
- If the key is not present in the EIS.
-
update
Description copied from interface:TSConnection
Update the key and value in Test Information System (TSEIS).- Specified by:
update
in interfaceTSConnection
- Parameters:
key
- Key to update.value
- value to update.- Throws:
Exception
- If the key is not present in the EIS.
-
getTempTable
Description copied from interface:TSConnection
Get the data cache of the connection accumulated during a transaction.- Specified by:
getTempTable
in interfaceTSConnection
-
inUse
- Throws:
Exception
-
setAutoCommit
public void setAutoCommit(boolean flag) Description copied from interface:TSConnection
Sets the auto-commit flag to the value passed in. True indicates that all the operation will be committed. If a false is passed, EIS will wait until an explicit commit is executed.- Specified by:
setAutoCommit
in interfaceTSConnection
- Parameters:
flag
- True or False
-
getAutoCommit
public boolean getAutoCommit()Description copied from interface:TSConnection
Get the auto-commt flag value.- Specified by:
getAutoCommit
in interfaceTSConnection
- Returns:
- the boolean value indicating auto-commit.
-
dropTable
Description copied from interface:TSConnection
Drops all data in the EIS.- Specified by:
dropTable
in interfaceTSConnection
- Throws:
Exception
- If there is any exception while droppping.
-
begin
- Specified by:
begin
in interfaceTSConnection
- Throws:
Exception
-
rollback
public void rollback()Description copied from interface:TSConnection
Rolls back all the operations.- Specified by:
rollback
in interfaceTSConnection
-
commit
Description copied from interface:TSConnection
Commits all the operations.- Specified by:
commit
in interfaceTSConnection
- Throws:
Exception
- If commit fails.
-
close
Description copied from interface:TSConnection
Closes this connection.- Specified by:
close
in interfaceTSConnection
- Throws:
Exception
- If close fails.
-
readData
Description copied from interface:TSConnection
Get all the data in the TSEis. Only Data is returned. Keys are not.- Specified by:
readData
in interfaceTSConnection
- Returns:
- Vector containing all the data values.
- Throws:
Exception
- If read fails.
-
readValue
Description copied from interface:TSConnection
Read the value for the key.- Specified by:
readValue
in interfaceTSConnection
- Parameters:
key
- Key to read.- Returns:
- String value.
- Throws:
Exception
- If the key is not present in the EIS.
-