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
Class TargetDataStoreImpl

java.lang.Object
  extended by com.timesten.dataserver.jmsxla.TargetDataStoreImpl

All Implemented Interfaces:
TargetDataStore

public class TargetDataStoreImpl
extends java.lang.Object
implements TargetDataStore

This class implements TargetDataStore and should be used to instantitate a TargetDataStore.


Constructor Summary
TargetDataStoreImpl(java.lang.String connectionString)
          TargetDataStore creates connections and XLA handles to the datastore.

 

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.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TargetDataStoreImpl

public TargetDataStoreImpl(java.lang.String connectionString)
                    throws javax.jms.JMSException
TargetDataStore creates connections and XLA handles to the datastore.
Parameters:
connectionString - connection string to the datastore. If auto-commit is enabled, applies will be committed.
Throws:
javax.jms.JMSException

Method Detail

commit

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

rollback

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

isDataStoreValid

public boolean isDataStoreValid()
                         throws javax.jms.JMSException
Description copied from interface: TargetDataStore
Checks if the datastore is valid.
Specified by:
isDataStoreValid in interface TargetDataStore
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:
TargetDataStore.close()

close

public void close()
           throws javax.jms.JMSException
Description copied from interface: TargetDataStore
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.
Specified by:
close in interface TargetDataStore
Throws:
javax.jms.JMSException - if some unrecoverable error occurs while closing.

getConnectionString

public java.lang.String getConnectionString()
Description copied from interface: TargetDataStore
Returns the connection string for this data store.
Specified by:
getConnectionString in interface TargetDataStore
Returns:
Connection string for this datastore.

apply

public int apply(byte[] updateDescriptor,
                 boolean useCommitFlag,
                 boolean checkUpdateConflict)
          throws javax.jms.JMSException
Description copied from interface: TargetDataStore
Applies XLA update descriptor to the target datastore.
Specified by:
apply in interface TargetDataStore
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.

apply

public int apply(byte[] updateDescriptor,
                 boolean useCommitFlag)
          throws javax.jms.JMSException
Description copied from interface: TargetDataStore
Applies XLA update descriptor to the target datastore. If updateConflictCheckFlag is set, update conflicts will be checked and reported.
Specified by:
apply in interface TargetDataStore
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:
TargetDataStore.setUpdateConflictCheckFlag(boolean)

apply

public int apply(byte[] updateDescriptor)
          throws javax.jms.JMSException
Description copied from interface: TargetDataStore
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.
Specified by:
apply in interface TargetDataStore
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:
TargetDataStore.setAutoCommitFlag(boolean), TargetDataStore.setUpdateConflictCheckFlag(boolean)

getAutoCommitFlag

public boolean getAutoCommitFlag()
Description copied from interface: TargetDataStore
Returns the value of autocommit flag.
Specified by:
getAutoCommitFlag in interface TargetDataStore
Returns:
true if this flag is set.

getUpdateConflictCheckFlag

public boolean getUpdateConflictCheckFlag()
Description copied from interface: TargetDataStore
Returns the value of the flag to check update conflicts.
Specified by:
getUpdateConflictCheckFlag in interface TargetDataStore
Returns:
true if update conflicts are checked during apply.

setAutoCommitFlag

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

setUpdateConflictCheckFlag

public void setUpdateConflictCheckFlag(boolean flag)
Description copied from interface: TargetDataStore
Sets the flag for checking update conflicts during apply.
Specified by:
setUpdateConflictCheckFlag in interface TargetDataStore
Parameters:
flag - If set to true, update conflicts will be checked during apply.
See Also:
TargetDataStore.apply(byte[]), TargetDataStore.apply(byte[], boolean)

isClosed

public boolean isClosed()
Description copied from interface: TargetDataStore
Use this method to check if this object is closed. A closed object cannot be used any longer.
Specified by:
isClosed in interface TargetDataStore
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.