Skip navigation links

Oracle® TimesTen In-Memory Database JMS/XLA Java API Reference
11g Release 2 (11.2.2)

E21648-03


com.timesten.dataserver.jmsxla
Interface TargetDataStore

All Known Implementing Classes:
TargetDataStoreImpl

public interface TargetDataStore

This interface is used to apply XLA update records from a source datastore to a target datastore. It assumes that the source and target datastore schema are IDENTICAL for the subject tables.


Method Summary
 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.

 

Method Detail

getConnectionString

java.lang.String getConnectionString()
Returns the connection string for this data store.
Returns:
Connection string for this datastore.

setUpdateConflictCheckFlag

void setUpdateConflictCheckFlag(boolean flag)
Sets the flag for checking update conflicts during apply.
Parameters:
flag - If set to true, update conflicts will be checked during apply.
See Also:
apply(byte[]), apply(byte[], boolean)

getUpdateConflictCheckFlag

boolean getUpdateConflictCheckFlag()
Returns the value of the flag to check update conflicts.
Returns:
true if update conflicts are checked during apply.

setAutoCommitFlag

void setAutoCommitFlag(boolean flag)
Sets the flag for autocommit during apply.
Parameters:
flag - If set to true, apply will commit if TT_UPDCOMMIT is set or record type is COMMITONLY.
See Also:
apply(byte[]), commit(), rollback()

getAutoCommitFlag

boolean getAutoCommitFlag()
Returns the value of autocommit flag.
Returns:
true if this flag is set.

apply

int apply(byte[] updateDescriptor)
          throws javax.jms.JMSException
Applies XLA update descriptor to the target datastore. Transactions will be committed if TT_UPDCOMMIT flag is set or if the record type is COMMITONLY. If updateConflictCheckFlag is set, update conflicts will be checked and reported.
Parameters:
updateDescriptor - XLA update descriptor. This can be extracted from JMS/XLA TimesTenMapMessage.
Returns:
0 if successful. Otherwise, a transient error code is returned. Applications can retry.
Throws:
javax.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.
See Also:
setAutoCommitFlag(boolean), setUpdateConflictCheckFlag(boolean)

apply

int apply(byte[] updateDescriptor,
          boolean useCommitFlag)
          throws javax.jms.JMSException
Applies XLA update descriptor to the target datastore. If updateConflictCheckFlag is set, update conflicts will be checked and reported.
Parameters:
updateDescriptor - 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.
Returns:
0 if successful. Otherwise, a transient error code is returned. Applications can retry.
Throws:
javax.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.
See Also:
setUpdateConflictCheckFlag(boolean)

apply

int apply(byte[] updateDescriptor,
          boolean useCommitFlag,
          boolean checkUpdateConflict)
          throws javax.jms.JMSException
Applies XLA update descriptor to the target datastore.
Parameters:
updateDescriptor - 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.
Returns:
0 if successful. Otherwise, a transient error code is returned. Applications can retry.
Throws:
javax.jms.JMSException - If there are database errors or schema mismatch, this exception will be thrown.

commit

int commit()
           throws javax.jms.JMSException
Use this method to perform a manual commit.
Returns:
0 if successful. Otherwise, a transient error code is returned. Applications can retry.
Throws:
javax.jms.JMSException - if commit fails.
See Also:
setAutoCommitFlag(boolean)

rollback

int rollback()
             throws javax.jms.JMSException
Use this method to rollback the last transaction in case of errors.
Returns:
0 if successful. Otherwise, a transient error code is returned. Applications can retry.
Throws:
javax.jms.JMSException - if rollback fails.

isDataStoreValid

boolean isDataStoreValid()
                         throws javax.jms.JMSException
Checks if the datastore is valid.
Returns:
true is the datastore is valid. This object should be closed and a new object instantiated. Continued use of this object will result in failures.
Throws:
javax.jms.JMSException - if it cannot ascertain the status of the datastore.
See Also:
close()

close

void close()
           throws javax.jms.JMSException
Closes the connections to the datastore and releases all the resources in a timely manner. Use of close() is highly recommended over relying on the garbage collector to release unneeded resources. Once closed, this object cannot be reused.
Throws:
javax.jms.JMSException - if some unrecoverable error occurs while closing.

isClosed

boolean isClosed()
Use this method to check if this object is closed. A closed object cannot be used any longer.
Returns:
true if this object is closed.

Skip navigation links

Oracle® TimesTen In-Memory Database JMS/XLA Java API Reference
11g Release 2 (11.2.2)

E21648-03


Copyright © 1999, 2013, Oracle and/or its affiliates. All rights reserved.