|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.messaging.core.impl.JDBCSupport org.jboss.messaging.core.impl.postoffice.MessagingPostOffice
public class MessagingPostOffice
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jboss.messaging.core.impl.JDBCSupport |
---|
JDBCSupport.JDBCTxRunner<T>, JDBCSupport.JDBCTxRunner2<T>, JDBCSupport.TransactionWrapper |
Field Summary | |
---|---|
static java.lang.String |
FAILOVER_COMPLETED_NOTIFICATION
|
static java.lang.String |
VIEW_CHANGED_NOTIFICATION
|
Fields inherited from class org.jboss.messaging.core.impl.JDBCSupport |
---|
ds, sqlProperties |
Fields inherited from interface org.jboss.messaging.core.contract.Replicator |
---|
CF_PREFIX, JVM_ID_KEY |
Constructor Summary | |
---|---|
MessagingPostOffice(javax.sql.DataSource ds,
TransactionManager tm,
java.util.Properties sqlProperties,
boolean createTablesOnStartup,
int nodeId,
java.lang.String officeName,
MessageStore ms,
PersistenceManager pm,
TransactionRepository tr,
FilterFactory filterFactory,
ConditionFactory conditionFactory,
IDManager channelIDManager,
ClusterNotifier clusterNotifier)
|
|
MessagingPostOffice(javax.sql.DataSource ds,
TransactionManager tm,
java.util.Properties sqlProperties,
boolean createTablesOnStartup,
int nodeId,
java.lang.String officeName,
MessageStore ms,
PersistenceManager pm,
TransactionRepository tr,
FilterFactory filterFactory,
ConditionFactory conditionFactory,
IDManager channelIDManager,
ClusterNotifier clusterNotifier,
java.lang.String groupName,
ChannelFactory jChannelFactory,
long stateTimeout,
long castTimeout,
boolean supportsFailover,
int maxConcurrentReplications)
|
Method Summary | |
---|---|
boolean |
addBinding(Binding binding,
boolean allNodes)
Add a binding to the post office |
void |
addBindingFromCluster(org.jboss.messaging.core.impl.postoffice.MappingInfo mapping,
boolean allNodes)
|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object object)
|
static java.lang.String |
dumpClusterMap(java.util.Map map)
|
static java.lang.String |
dumpFailoverMap(java.util.Map map)
|
java.util.Map |
get(java.io.Serializable key)
Return a node-mapped replicated data. |
java.util.Collection |
getAllBindings()
Get all the bindings |
java.util.Collection |
getAllBindingsForQueueName(java.lang.String queueName)
Get all bindings with the specified queue name (They will be on different nodes) |
Binding |
getBindingForChannelID(long channelID)
Get the binding with the specified channel ID |
Binding |
getBindingForQueueName(java.lang.String queueName)
Get the binding with the specified queue name |
protected java.util.Map |
getDefaultDDLStatements()
|
protected java.util.Map |
getDefaultDMLStatements()
|
java.util.Map |
getFailoverMap()
Get the failover map |
MessagingComponent |
getInstance()
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
java.lang.String |
getOfficeName()
Get the name of the post office |
java.util.Collection |
getQueuesForCondition(Condition condition,
boolean localOnly)
Get all queues that match the condition |
java.util.Map |
getRecoveryArea(java.lang.String queueName)
|
int |
getRecoveryMapSize(java.lang.String queueName)
|
byte[] |
getState()
|
void |
handleAckAllReplicatedDeliveries(int nodeID)
|
void |
handleAddAllReplicatedDeliveries(int nodeID,
java.util.Map deliveries)
|
void |
handleGetReplicatedDeliveries(java.lang.String queueName,
Address returnAddress)
|
void |
handleNodeJoined(int nodeId,
org.jboss.messaging.core.impl.postoffice.PostOfficeAddressInfo info)
|
void |
handleNodeLeft(int nodeId)
|
void |
handleReplicateAck(int nodeID,
java.lang.String queueName,
long messageID)
|
void |
handleReplicateDelivery(int nodeID,
java.lang.String queueName,
java.lang.String sessionID,
long messageID,
long deliveryID,
Address replyAddress)
|
void |
handleReplicateDeliveryAck(java.lang.String sessionID,
long deliveryID)
|
void |
injectServerPeer(ServerPeer serverPeer)
|
boolean |
isClustered()
Is this post office clustered? |
boolean |
isFirstNode()
|
boolean |
isSupportsFailover()
|
java.util.Set |
nodeIDView()
Get a set of nodes in the cluster |
void |
nodeJoined(Address address)
|
void |
nodesLeft(java.util.List addresses)
|
java.lang.String |
printBindingInformation()
|
void |
put(java.io.Serializable key,
java.io.Serializable replicant)
Broadcast data across the cluster, updating replication maps on all nodes, including the local node. |
void |
putReplicantLocally(int originatorNodeID,
java.io.Serializable key,
java.io.Serializable replicant)
|
boolean |
remove(java.io.Serializable key)
Updates the replication maps across the cluster by removing the data corresponding to the give key. |
Binding |
removeBinding(java.lang.String queueName,
boolean allNodes)
Remove a binding from the post office |
void |
removeBindingFromCluster(org.jboss.messaging.core.impl.postoffice.MappingInfo mapping,
boolean allNodes)
|
void |
removeNotificationListener(javax.management.NotificationListener listener)
|
boolean |
removeReplicantLocally(int originatorNodeID,
java.io.Serializable key)
|
boolean |
route(MessageReference ref,
Condition condition,
Transaction tx)
Route a reference. |
void |
routeFromCluster(Message message,
java.lang.String routingKeyText,
java.util.Set queueNames)
|
void |
sendReplicateAckMessage(java.lang.String queueName,
long messageID)
|
void |
sendReplicateDeliveryMessage(java.lang.String queueName,
java.lang.String sessionID,
long messageID,
long deliveryID,
boolean reply,
boolean sync)
|
void |
setState(byte[] bytes)
|
void |
start()
|
void |
stop()
|
Methods inherited from class org.jboss.messaging.core.impl.JDBCSupport |
---|
closeConnection, closeResultSet, closeStatement, getSQLStatement, ignoreVerificationOnStartup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VIEW_CHANGED_NOTIFICATION
public static final java.lang.String FAILOVER_COMPLETED_NOTIFICATION
Constructor Detail |
---|
public MessagingPostOffice(javax.sql.DataSource ds, TransactionManager tm, java.util.Properties sqlProperties, boolean createTablesOnStartup, int nodeId, java.lang.String officeName, MessageStore ms, PersistenceManager pm, TransactionRepository tr, FilterFactory filterFactory, ConditionFactory conditionFactory, IDManager channelIDManager, ClusterNotifier clusterNotifier) throws java.lang.Exception
java.lang.Exception
public MessagingPostOffice(javax.sql.DataSource ds, TransactionManager tm, java.util.Properties sqlProperties, boolean createTablesOnStartup, int nodeId, java.lang.String officeName, MessageStore ms, PersistenceManager pm, TransactionRepository tr, FilterFactory filterFactory, ConditionFactory conditionFactory, IDManager channelIDManager, ClusterNotifier clusterNotifier, java.lang.String groupName, ChannelFactory jChannelFactory, long stateTimeout, long castTimeout, boolean supportsFailover, int maxConcurrentReplications) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public static java.lang.String dumpFailoverMap(java.util.Map map)
map
- - Mappublic static java.lang.String dumpClusterMap(java.util.Map map)
map
- - Mappublic MessagingComponent getInstance()
public void start() throws java.lang.Exception
start
in interface MessagingComponent
start
in class JDBCSupport
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface MessagingComponent
stop
in class JDBCSupport
java.lang.Exception
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object object) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
javax.management.ListenerNotFoundException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
public java.lang.String getOfficeName()
PostOffice
getOfficeName
in interface PostOffice
public boolean addBinding(Binding binding, boolean allNodes) throws java.lang.Exception
PostOffice
addBinding
in interface PostOffice
binding
- The binding to addallNodes
- Add this binding on ALL nodes?
java.lang.Exception
public Binding removeBinding(java.lang.String queueName, boolean allNodes) throws java.lang.Throwable
PostOffice
removeBinding
in interface PostOffice
queueName
- The queue name that identifies the bindingallNodes
- Remove this binding from ALL node?
java.lang.Throwable
public boolean route(MessageReference ref, Condition condition, Transaction tx) throws java.lang.Exception
PostOffice
route
in interface PostOffice
condition
- - the message will be routed to queue(s) if the specified condition matches the
condition of the bindings.tx
- - the transaction or null if not in the context of a transaction.
java.lang.Exception
public java.util.Collection getQueuesForCondition(Condition condition, boolean localOnly) throws java.lang.Exception
PostOffice
getQueuesForCondition
in interface PostOffice
condition
- The conditionlocalOnly
- Only retrieve local queues ?
java.lang.Exception
public Binding getBindingForQueueName(java.lang.String queueName) throws java.lang.Exception
PostOffice
getBindingForQueueName
in interface PostOffice
java.lang.Exception
public Binding getBindingForChannelID(long channelID) throws java.lang.Exception
PostOffice
getBindingForChannelID
in interface PostOffice
java.lang.Exception
public boolean isClustered()
PostOffice
isClustered
in interface PostOffice
public java.util.Map getFailoverMap()
PostOffice
getFailoverMap
in interface PostOffice
public java.util.Collection getAllBindingsForQueueName(java.lang.String queueName) throws java.lang.Exception
PostOffice
getAllBindingsForQueueName
in interface PostOffice
java.lang.Exception
public java.util.Collection getAllBindings() throws java.lang.Exception
PostOffice
getAllBindings
in interface PostOffice
java.lang.Exception
public java.util.Set nodeIDView()
PostOffice
nodeIDView
in interface PostOffice
public void sendReplicateDeliveryMessage(java.lang.String queueName, java.lang.String sessionID, long messageID, long deliveryID, boolean reply, boolean sync) throws java.lang.Exception
sendReplicateDeliveryMessage
in interface PostOffice
java.lang.Exception
public void sendReplicateAckMessage(java.lang.String queueName, long messageID) throws java.lang.Exception
sendReplicateAckMessage
in interface PostOffice
java.lang.Exception
public void injectServerPeer(ServerPeer serverPeer)
public boolean isFirstNode()
isFirstNode
in interface PostOffice
public java.util.Map getRecoveryArea(java.lang.String queueName)
getRecoveryArea
in interface PostOffice
public int getRecoveryMapSize(java.lang.String queueName)
getRecoveryMapSize
in interface PostOffice
public void setState(byte[] bytes) throws java.lang.Exception
java.lang.Exception
public byte[] getState() throws java.lang.Exception
java.lang.Exception
public void nodeJoined(Address address) throws java.lang.Exception
java.lang.Exception
public void nodesLeft(java.util.List addresses) throws java.lang.Throwable
java.lang.Throwable
public void addBindingFromCluster(org.jboss.messaging.core.impl.postoffice.MappingInfo mapping, boolean allNodes) throws java.lang.Exception
java.lang.Exception
public void removeBindingFromCluster(org.jboss.messaging.core.impl.postoffice.MappingInfo mapping, boolean allNodes) throws java.lang.Throwable
java.lang.Throwable
public void handleNodeLeft(int nodeId) throws java.lang.Exception
java.lang.Exception
public void handleNodeJoined(int nodeId, org.jboss.messaging.core.impl.postoffice.PostOfficeAddressInfo info) throws java.lang.Exception
java.lang.Exception
public void putReplicantLocally(int originatorNodeID, java.io.Serializable key, java.io.Serializable replicant) throws java.lang.Exception
originatorNodeID
- - the ID of the node that initiated the modification.
java.lang.Exception
public boolean removeReplicantLocally(int originatorNodeID, java.io.Serializable key) throws java.lang.Exception
originatorNodeID
- - the ID of the node that initiated the modification.
java.lang.Exception
public void routeFromCluster(Message message, java.lang.String routingKeyText, java.util.Set queueNames) throws java.lang.Exception
java.lang.Exception
public void handleReplicateDelivery(int nodeID, java.lang.String queueName, java.lang.String sessionID, long messageID, long deliveryID, Address replyAddress) throws java.lang.Exception
java.lang.Exception
public void handleGetReplicatedDeliveries(java.lang.String queueName, Address returnAddress) throws java.lang.Exception
java.lang.Exception
public void handleReplicateAck(int nodeID, java.lang.String queueName, long messageID) throws java.lang.Exception
java.lang.Exception
public void handleReplicateDeliveryAck(java.lang.String sessionID, long deliveryID) throws java.lang.Exception
java.lang.Exception
public void handleAckAllReplicatedDeliveries(int nodeID) throws java.lang.Exception
java.lang.Exception
public void handleAddAllReplicatedDeliveries(int nodeID, java.util.Map deliveries) throws java.lang.Exception
java.lang.Exception
public void put(java.io.Serializable key, java.io.Serializable replicant) throws java.lang.Exception
Replicator
put
in interface Replicator
java.lang.Exception
public java.util.Map get(java.io.Serializable key) throws java.lang.Exception
Replicator
get
in interface Replicator
java.lang.Exception
public boolean remove(java.io.Serializable key) throws java.lang.Exception
Replicator
remove
in interface Replicator
java.lang.Exception
protected java.util.Map getDefaultDMLStatements()
getDefaultDMLStatements
in class JDBCSupport
protected java.util.Map getDefaultDDLStatements()
getDefaultDDLStatements
in class JDBCSupport
public boolean isSupportsFailover()
public java.lang.String printBindingInformation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |