Package com.swiftmq.impl.topic.standard
Class TopicBroker
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue
com.swiftmq.impl.topic.standard.TopicBroker
- All Implemented Interfaces:
Iterable
,Collection
,Queue
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addStaticSubscription
(String routerName, boolean keepOnUnsubscribe) protected void
void
Commit the transaction with the given transaction idvoid
void
Creates a new pull transaction and returns a unique transaction idCreates a new push transaction and returns a unique transaction idprotected List
getMatchedTopics
(String[] tokenizedPredicate) protected String
protected String
getTopicName
(String[] tokenizedPredicate) protected String[]
boolean
hasReceiver
(MessageImpl message) boolean
Returns if the queue is running or notvoid
void
protected void
processTopicInfo
(TopicInfo topicInfo) void
putMessage
(Object transactionId, MessageImpl msg) void
removeRemoteSubscriptions
(String destination) protected void
removeStaticSubscription
(String routerName) protected void
removeTopic
(String topic, String[] tokenizedName) void
Rolls back the transaction with the given transaction id.void
void
void
setCompositeStoreTransaction
(Object txId, CompositeStoreTransaction ct) void
setSlowSubscriberCondition
(SlowSubscriberCondition slowSubscriberCondition) void
Start the queue.void
Stops the queue.protected void
subscribe
(TopicSubscription topicSubscription) toString()
void
unlockQueue
(Object txId, boolean markAsyncActive) protected void
unsubscribe
(TopicSubscription topicSubscription) Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
TopicBroker
-
-
Method Details
-
getRootTopic
-
setSlowSubscriberCondition
-
addTopic
-
removeTopic
-
getTopicNames
-
getTopicName
-
getMatchedTopics
-
subscribe
-
unsubscribe
-
addStaticSubscription
-
removeStaticSubscription
-
processTopicInfo
-
startQueue
public void startQueue() throws QueueExceptionStart the queue. Will be called from the queue manager. After startup all persistent messages stored in the queue must be available.- Throws:
QueueException
- on error
-
stopQueue
public void stopQueue() throws QueueExceptionStops the queue. Will be called from the queue manager- Throws:
QueueException
- on error
-
lockQueue
-
unlockQueue
-
setCompositeStoreTransaction
-
hasReceiver
public boolean hasReceiver(MessageImpl message) -
isRunning
public boolean isRunning()Returns if the queue is running or not- Returns:
- true/false
-
createPushTransaction
Creates a new push transaction and returns a unique transaction id- Returns:
- transaction id
- Throws:
QueueException
- on error
-
createPullTransaction
Creates a new pull transaction and returns a unique transaction id- Returns:
- transaction id
- Throws:
QueueException
- on error
-
prepare
- Throws:
QueueException
-
commit
- Throws:
QueueException
-
commit
Commit the transaction with the given transaction id- Parameters:
transactionId
- transaction id- Throws:
QueueException
- on error
-
commit
-
rollback
public void rollback(Object localTransactionId, XidImpl globalTransactionId, boolean setRedelivered) throws QueueException - Throws:
QueueException
-
rollback
Rolls back the transaction with the given transaction id. If the flagsetRedelivered
is set then the JMS properties for redelivery and delivery count of messages pulled within this transaction are updated- Parameters:
transactionId
- transaction idsetRedelivered
- specifies JMS redelivery setting- Throws:
QueueException
- on error
-
rollback
public void rollback(Object transactionId, boolean setRedelivered, AsyncCompletionCallback callback) -
removeRemoteSubscriptions
-
putMessage
- Throws:
QueueException
-
toString
- Overrides:
toString
in classAbstractCollection
-