public class DefaultJDBCAdapter extends Object implements JDBCAdapter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
batchStatments |
protected ReadWriteLock |
cleanupExclusiveLock |
static int |
MAX_ROWS |
protected int |
maxRows |
protected boolean |
prioritizedMessages |
protected Statements |
statements |
| Constructor and Description |
|---|
DefaultJDBCAdapter() |
public static final int MAX_ROWS
protected Statements statements
protected boolean batchStatments
protected boolean prioritizedMessages
protected ReadWriteLock cleanupExclusiveLock
protected int maxRows
public DefaultJDBCAdapter()
protected void setBinaryData(PreparedStatement s, int index, byte[] data) throws SQLException
SQLExceptionprotected byte[] getBinaryData(ResultSet rs, int index) throws SQLException
SQLExceptionpublic void doCreateTables(TransactionContext c) throws SQLException, IOException
doCreateTables in interface JDBCAdapterSQLExceptionIOExceptionpublic void doDropTables(TransactionContext c) throws SQLException, IOException
doDropTables in interface JDBCAdapterSQLExceptionIOExceptionpublic long doGetLastMessageStoreSequenceId(TransactionContext c) throws SQLException, IOException
doGetLastMessageStoreSequenceId in interface JDBCAdapterSQLExceptionIOExceptionpublic byte[] doGetMessageById(TransactionContext c, long storeSequenceId) throws SQLException, IOException
doGetMessageById in interface JDBCAdapterSQLExceptionIOExceptionpublic void doAddMessage(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, byte[] data, long expiration, byte priority) throws SQLException, IOException
doAddMessage in interface JDBCAdapterSQLExceptionIOExceptionpublic void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException
doAddMessageReference in interface JDBCAdapterSQLExceptionIOExceptionpublic long[] getStoreSequenceId(TransactionContext c, ActiveMQDestination destination, MessageId messageID) throws SQLException, IOException
getStoreSequenceId in interface JDBCAdapterSQLExceptionIOExceptionpublic byte[] doGetMessage(TransactionContext c, MessageId id) throws SQLException, IOException
doGetMessage in interface JDBCAdapterSQLExceptionIOExceptionpublic String doGetMessageReference(TransactionContext c, long seq) throws SQLException, IOException
doGetMessageReference in interface JDBCAdapterSQLExceptionIOExceptionpublic void doRemoveMessage(TransactionContext c, long seq) throws SQLException, IOException
doRemoveMessage in interface JDBCAdapterSQLExceptionIOExceptionpublic void doRecover(TransactionContext c, ActiveMQDestination destination, JDBCMessageRecoveryListener listener) throws Exception
doRecover in interface JDBCAdapterExceptionpublic void doMessageIdScan(TransactionContext c, int limit, JDBCMessageIdScanListener listener) throws SQLException, IOException
doMessageIdScan in interface JDBCAdapterSQLExceptionIOExceptionpublic void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long prio) throws SQLException, IOException
doSetLastAckWithPriority in interface JDBCAdapterSQLExceptionIOExceptionpublic void doSetLastAck(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException
doSetLastAck in interface JDBCAdapterSQLExceptionIOExceptionpublic void doRecoverSubscription(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, JDBCMessageRecoveryListener listener) throws Exception
doRecoverSubscription in interface JDBCAdapterExceptionpublic void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessages in interface JDBCAdapterExceptionpublic void doRecoverNextMessagesWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessagesWithPriority in interface JDBCAdapterExceptionpublic int doGetDurableSubscriberMessageCount(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, boolean isPrioritizedMessages) throws SQLException, IOException
doGetDurableSubscriberMessageCount in interface JDBCAdapterSQLExceptionIOExceptionpublic void doSetSubscriberEntry(TransactionContext c, SubscriptionInfo info, boolean retroactive, boolean isPrioritizedMessages) throws SQLException, IOException
doSetSubscriberEntry in interface JDBCAdapterc - info - retroactive - SQLExceptionIOExceptionpublic SubscriptionInfo doGetSubscriberEntry(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName) throws SQLException, IOException
doGetSubscriberEntry in interface JDBCAdapterSQLExceptionIOExceptionpublic SubscriptionInfo[] doGetAllSubscriptions(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doGetAllSubscriptions in interface JDBCAdapterSQLExceptionIOExceptionpublic void doRemoveAllMessages(TransactionContext c, ActiveMQDestination destinationName) throws SQLException, IOException
doRemoveAllMessages in interface JDBCAdapterSQLExceptionIOExceptionpublic void doDeleteSubscription(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName) throws SQLException, IOException
doDeleteSubscription in interface JDBCAdapterSQLExceptionIOExceptionpublic void doDeleteOldMessages(TransactionContext c) throws SQLException, IOException
doDeleteOldMessages in interface JDBCAdapterSQLExceptionIOExceptionpublic long doGetLastAckedDurableSubscriberMessageId(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriberName) throws SQLException, IOException
doGetLastAckedDurableSubscriberMessageId in interface JDBCAdapterSQLExceptionIOExceptionprotected static void close(PreparedStatement s)
public Set<ActiveMQDestination> doGetDestinations(TransactionContext c) throws SQLException, IOException
doGetDestinations in interface JDBCAdapterSQLExceptionIOExceptionpublic boolean isBatchStatments()
public void setBatchStatments(boolean batchStatments)
batchStatments - public void setUseExternalMessageReferences(boolean useExternalMessageReferences)
setUseExternalMessageReferences in interface JDBCAdapterpublic Statements getStatements()
public void setStatements(Statements statements)
setStatements in interface JDBCAdapterpublic int getMaxRows()
getMaxRows in interface JDBCAdapterpublic void setMaxRows(int maxRows)
setMaxRows in interface JDBCAdapterpublic void doRecordDestination(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doRecordDestination in interface JDBCAdapterSQLExceptionIOExceptionpublic byte[] doGetNextDurableSubscriberMessageStatement(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriberName) throws SQLException, IOException
c - destination - clientId - subscriberName - SQLExceptionIOExceptionpublic int doGetMessageCount(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doGetMessageCount in interface JDBCAdapterSQLExceptionIOExceptionpublic void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, long nextSeq, long priority, int maxReturned, boolean isPrioritizedMessages, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessages in interface JDBCAdapterExceptionpublic long doGetLastProducerSequenceId(TransactionContext c, ProducerId id) throws SQLException, IOException
doGetLastProducerSequenceId in interface JDBCAdapterSQLExceptionIOExceptionCopyright © 2005–2017. All rights reserved.