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
SQLException
protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException
SQLException
public void doCreateTables(TransactionContext c) throws SQLException, IOException
doCreateTables
in interface JDBCAdapter
SQLException
IOException
public void doDropTables(TransactionContext c) throws SQLException, IOException
doDropTables
in interface JDBCAdapter
SQLException
IOException
public long doGetLastMessageStoreSequenceId(TransactionContext c) throws SQLException, IOException
doGetLastMessageStoreSequenceId
in interface JDBCAdapter
SQLException
IOException
public byte[] doGetMessageById(TransactionContext c, long storeSequenceId) throws SQLException, IOException
doGetMessageById
in interface JDBCAdapter
SQLException
IOException
public void doAddMessage(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, byte[] data, long expiration, byte priority) throws SQLException, IOException
doAddMessage
in interface JDBCAdapter
SQLException
IOException
public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination, long expirationTime, String messageRef) throws SQLException, IOException
doAddMessageReference
in interface JDBCAdapter
SQLException
IOException
public long[] getStoreSequenceId(TransactionContext c, ActiveMQDestination destination, MessageId messageID) throws SQLException, IOException
getStoreSequenceId
in interface JDBCAdapter
SQLException
IOException
public byte[] doGetMessage(TransactionContext c, MessageId id) throws SQLException, IOException
doGetMessage
in interface JDBCAdapter
SQLException
IOException
public String doGetMessageReference(TransactionContext c, long seq) throws SQLException, IOException
doGetMessageReference
in interface JDBCAdapter
SQLException
IOException
public void doRemoveMessage(TransactionContext c, long seq) throws SQLException, IOException
doRemoveMessage
in interface JDBCAdapter
SQLException
IOException
public void doRecover(TransactionContext c, ActiveMQDestination destination, JDBCMessageRecoveryListener listener) throws Exception
doRecover
in interface JDBCAdapter
Exception
public void doMessageIdScan(TransactionContext c, int limit, JDBCMessageIdScanListener listener) throws SQLException, IOException
doMessageIdScan
in interface JDBCAdapter
SQLException
IOException
public void doSetLastAckWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long prio) throws SQLException, IOException
doSetLastAckWithPriority
in interface JDBCAdapter
SQLException
IOException
public void doSetLastAck(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority) throws SQLException, IOException
doSetLastAck
in interface JDBCAdapter
SQLException
IOException
public void doRecoverSubscription(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, JDBCMessageRecoveryListener listener) throws Exception
doRecoverSubscription
in interface JDBCAdapter
Exception
public void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessages
in interface JDBCAdapter
Exception
public void doRecoverNextMessagesWithPriority(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, long seq, long priority, int maxReturned, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessagesWithPriority
in interface JDBCAdapter
Exception
public int doGetDurableSubscriberMessageCount(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName, boolean isPrioritizedMessages) throws SQLException, IOException
doGetDurableSubscriberMessageCount
in interface JDBCAdapter
SQLException
IOException
public void doSetSubscriberEntry(TransactionContext c, SubscriptionInfo info, boolean retroactive, boolean isPrioritizedMessages) throws SQLException, IOException
doSetSubscriberEntry
in interface JDBCAdapter
c
- info
- retroactive
- SQLException
IOException
public SubscriptionInfo doGetSubscriberEntry(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName) throws SQLException, IOException
doGetSubscriberEntry
in interface JDBCAdapter
SQLException
IOException
public SubscriptionInfo[] doGetAllSubscriptions(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doGetAllSubscriptions
in interface JDBCAdapter
SQLException
IOException
public void doRemoveAllMessages(TransactionContext c, ActiveMQDestination destinationName) throws SQLException, IOException
doRemoveAllMessages
in interface JDBCAdapter
SQLException
IOException
public void doDeleteSubscription(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriptionName) throws SQLException, IOException
doDeleteSubscription
in interface JDBCAdapter
SQLException
IOException
public void doDeleteOldMessages(TransactionContext c) throws SQLException, IOException
doDeleteOldMessages
in interface JDBCAdapter
SQLException
IOException
public long doGetLastAckedDurableSubscriberMessageId(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriberName) throws SQLException, IOException
doGetLastAckedDurableSubscriberMessageId
in interface JDBCAdapter
SQLException
IOException
protected static void close(PreparedStatement s)
public Set<ActiveMQDestination> doGetDestinations(TransactionContext c) throws SQLException, IOException
doGetDestinations
in interface JDBCAdapter
SQLException
IOException
public boolean isBatchStatments()
public void setBatchStatments(boolean batchStatments)
batchStatments
- public void setUseExternalMessageReferences(boolean useExternalMessageReferences)
setUseExternalMessageReferences
in interface JDBCAdapter
public Statements getStatements()
public void setStatements(Statements statements)
setStatements
in interface JDBCAdapter
public int getMaxRows()
getMaxRows
in interface JDBCAdapter
public void setMaxRows(int maxRows)
setMaxRows
in interface JDBCAdapter
public void doRecordDestination(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doRecordDestination
in interface JDBCAdapter
SQLException
IOException
public byte[] doGetNextDurableSubscriberMessageStatement(TransactionContext c, ActiveMQDestination destination, String clientId, String subscriberName) throws SQLException, IOException
c
- destination
- clientId
- subscriberName
- SQLException
IOException
public int doGetMessageCount(TransactionContext c, ActiveMQDestination destination) throws SQLException, IOException
doGetMessageCount
in interface JDBCAdapter
SQLException
IOException
public void doRecoverNextMessages(TransactionContext c, ActiveMQDestination destination, long nextSeq, long priority, int maxReturned, boolean isPrioritizedMessages, JDBCMessageRecoveryListener listener) throws Exception
doRecoverNextMessages
in interface JDBCAdapter
Exception
public long doGetLastProducerSequenceId(TransactionContext c, ProducerId id) throws SQLException, IOException
doGetLastProducerSequenceId
in interface JDBCAdapter
SQLException
IOException
Copyright © 2005–2014. All rights reserved.