public class TargetDataStoreImpl extends java.lang.Object implements TargetDataStore
| Constructor and Description |
|---|
TargetDataStoreImpl(java.lang.String connectionString)
TargetDataStore creates connections and XLA handles to the datastore.
|
| Modifier and Type | Method and Description |
|---|---|
int |
apply(byte[] updateDescriptor)
Applies XLA update descriptor to the target datastore.
|
int |
apply(byte[] updateDescriptor,
boolean useCommitFlag)
Applies XLA update descriptor to the target datastore.
|
int |
apply(byte[] updateDescriptor,
boolean useCommitFlag,
boolean checkUpdateConflict)
Applies XLA update descriptor to the target datastore.
|
void |
close()
Closes the connections to the datastore and releases all the resources in a timely manner.
|
int |
commit()
Use this method to perform a manual commit.
|
boolean |
getAutoCommitFlag()
Returns the value of autocommit flag.
|
java.lang.String |
getConnectionString()
Returns the connection string for this data store.
|
boolean |
getUpdateConflictCheckFlag()
Returns the value of the flag to check update conflicts.
|
boolean |
isClosed()
Use this method to check if this object is closed.
|
boolean |
isDataStoreValid()
Checks if the datastore is valid.
|
int |
rollback()
Use this method to rollback the last transaction in case of errors.
|
void |
setAutoCommitFlag(boolean flag)
Sets the flag for autocommit during apply.
|
void |
setUpdateConflictCheckFlag(boolean flag)
Sets the flag for checking update conflicts during apply.
|
public TargetDataStoreImpl(java.lang.String connectionString)
throws jakarta.jms.JMSException
connectionString - connection string to the datastore. If auto-commit is enabled, applies will
be committed.jakarta.jms.JMSException - In case of an error while initializing XLApublic int commit()
throws jakarta.jms.JMSException
TargetDataStorecommit in interface TargetDataStorejakarta.jms.JMSException - if commit fails.TargetDataStore.setAutoCommitFlag(boolean)public int rollback()
throws jakarta.jms.JMSException
TargetDataStorerollback in interface TargetDataStorejakarta.jms.JMSException - if rollback fails.public boolean isDataStoreValid()
throws jakarta.jms.JMSException
TargetDataStoreisDataStoreValid in interface TargetDataStorejakarta.jms.JMSException - if it cannot ascertain the status of the datastore.TargetDataStore.close()public void close()
throws jakarta.jms.JMSException
TargetDataStoreclose in interface TargetDataStorejakarta.jms.JMSException - if some unrecoverable error occurs while closing.public java.lang.String getConnectionString()
TargetDataStoregetConnectionString in interface TargetDataStorepublic int apply(byte[] updateDescriptor,
boolean useCommitFlag,
boolean checkUpdateConflict)
throws jakarta.jms.JMSException
TargetDataStoreapply in interface TargetDataStoreupdateDescriptor - XLA update descriptor. This can be extracted from JMS/XLA TimesTenMapMessage.useCommitFlag - If set, transactions will be committed if TT_UPDCOMMIT flag is set or if the record
type is COMMITONLY.checkUpdateConflict - If set, check for update conflicts and report.jakarta.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.public int apply(byte[] updateDescriptor,
boolean useCommitFlag)
throws jakarta.jms.JMSException
TargetDataStoreapply in interface TargetDataStoreupdateDescriptor - XLA update descriptor. This can be extracted from JMS/XLA TimesTenMapMessage.useCommitFlag - If set, transactions will be committed if TT_UPDCOMMIT flag is set or if the record
type is COMMITONLY.jakarta.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.TargetDataStore.setUpdateConflictCheckFlag(boolean)public int apply(byte[] updateDescriptor)
throws jakarta.jms.JMSException
TargetDataStoreapply in interface TargetDataStoreupdateDescriptor - XLA update descriptor. This can be extracted from JMS/XLA TimesTenMapMessage.jakarta.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.TargetDataStore.setAutoCommitFlag(boolean),
TargetDataStore.setUpdateConflictCheckFlag(boolean)public boolean getAutoCommitFlag()
TargetDataStoregetAutoCommitFlag in interface TargetDataStorepublic boolean getUpdateConflictCheckFlag()
TargetDataStoregetUpdateConflictCheckFlag in interface TargetDataStorepublic void setAutoCommitFlag(boolean flag)
TargetDataStoresetAutoCommitFlag in interface TargetDataStoreflag - If set to true, apply will commit if TT_UPDCOMMIT is set or record type is COMMITONLY.TargetDataStore.apply(byte[]),
TargetDataStore.commit(),
TargetDataStore.rollback()public void setUpdateConflictCheckFlag(boolean flag)
TargetDataStoresetUpdateConflictCheckFlag in interface TargetDataStoreflag - If set to true, update conflicts will be checked during apply.TargetDataStore.apply(byte[]),
TargetDataStore.apply(byte[], boolean)public boolean isClosed()
TargetDataStoreisClosed in interface TargetDataStore