mirror of https://github.com/apache/activemq.git
Added some fields for future use to the BrokerInfo and ProducerInfo classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@472165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da7478d9d5
commit
3daf923b51
|
@ -37,6 +37,7 @@ public class BrokerInfo extends BaseCommand{
|
||||||
boolean duplexConnection;
|
boolean duplexConnection;
|
||||||
BrokerInfo peerBrokerInfos[];
|
BrokerInfo peerBrokerInfos[];
|
||||||
String brokerName;
|
String brokerName;
|
||||||
|
long connectionId;
|
||||||
|
|
||||||
public boolean isBrokerInfo(){
|
public boolean isBrokerInfo(){
|
||||||
return true;
|
return true;
|
||||||
|
@ -169,4 +170,19 @@ public class BrokerInfo extends BaseCommand{
|
||||||
public void setNetworkConnection(boolean networkConnection){
|
public void setNetworkConnection(boolean networkConnection){
|
||||||
this.networkConnection=networkConnection;
|
this.networkConnection=networkConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The broker assigns a each connection it accepts a connection id.
|
||||||
|
*
|
||||||
|
* @openwire:property version=2
|
||||||
|
*/
|
||||||
|
public long getConnectionId() {
|
||||||
|
return connectionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionId(long connectionId) {
|
||||||
|
this.connectionId = connectionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class ProducerInfo extends BaseCommand {
|
||||||
protected ProducerId producerId;
|
protected ProducerId producerId;
|
||||||
protected ActiveMQDestination destination;
|
protected ActiveMQDestination destination;
|
||||||
protected BrokerId[] brokerPath;
|
protected BrokerId[] brokerPath;
|
||||||
|
protected boolean dispatchAsync;
|
||||||
|
|
||||||
public ProducerInfo() {
|
public ProducerInfo() {
|
||||||
}
|
}
|
||||||
|
@ -101,4 +102,19 @@ public class ProducerInfo extends BaseCommand {
|
||||||
return visitor.processAddProducer( this );
|
return visitor.processAddProducer( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the broker should dispatch messages from this producer async. Since sync
|
||||||
|
* dispatch could potentally block the producer thread, this could be an important
|
||||||
|
* setting for the producer.
|
||||||
|
*
|
||||||
|
* @openwire:property version=2
|
||||||
|
*/
|
||||||
|
public boolean isDispatchAsync() {
|
||||||
|
return dispatchAsync;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDispatchAsync(boolean dispatchAsync) {
|
||||||
|
this.dispatchAsync = dispatchAsync;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
info.setFaultTolerantConfiguration(bs.readBoolean());
|
info.setFaultTolerantConfiguration(bs.readBoolean());
|
||||||
info.setDuplexConnection(bs.readBoolean());
|
info.setDuplexConnection(bs.readBoolean());
|
||||||
info.setNetworkConnection(bs.readBoolean());
|
info.setNetworkConnection(bs.readBoolean());
|
||||||
|
info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,6 +108,7 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
bs.writeBoolean(info.isFaultTolerantConfiguration());
|
bs.writeBoolean(info.isFaultTolerantConfiguration());
|
||||||
bs.writeBoolean(info.isDuplexConnection());
|
bs.writeBoolean(info.isDuplexConnection());
|
||||||
bs.writeBoolean(info.isNetworkConnection());
|
bs.writeBoolean(info.isNetworkConnection());
|
||||||
|
rc+=tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
|
||||||
|
|
||||||
return rc + 0;
|
return rc + 0;
|
||||||
}
|
}
|
||||||
|
@ -131,6 +133,7 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
bs.readBoolean();
|
bs.readBoolean();
|
||||||
|
tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +168,7 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
info.setFaultTolerantConfiguration(dataIn.readBoolean());
|
info.setFaultTolerantConfiguration(dataIn.readBoolean());
|
||||||
info.setDuplexConnection(dataIn.readBoolean());
|
info.setDuplexConnection(dataIn.readBoolean());
|
||||||
info.setNetworkConnection(dataIn.readBoolean());
|
info.setNetworkConnection(dataIn.readBoolean());
|
||||||
|
info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +190,7 @@ public class BrokerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
dataOut.writeBoolean(info.isFaultTolerantConfiguration());
|
dataOut.writeBoolean(info.isFaultTolerantConfiguration());
|
||||||
dataOut.writeBoolean(info.isDuplexConnection());
|
dataOut.writeBoolean(info.isDuplexConnection());
|
||||||
dataOut.writeBoolean(info.isNetworkConnection());
|
dataOut.writeBoolean(info.isNetworkConnection());
|
||||||
|
looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class ProducerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
else {
|
else {
|
||||||
info.setBrokerPath(null);
|
info.setBrokerPath(null);
|
||||||
}
|
}
|
||||||
|
info.setDispatchAsync(bs.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@ public class ProducerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
|
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
|
||||||
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
|
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
|
||||||
rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
|
rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
|
||||||
|
bs.writeBoolean(info.isDispatchAsync());
|
||||||
|
|
||||||
return rc + 0;
|
return rc + 0;
|
||||||
}
|
}
|
||||||
|
@ -113,6 +115,7 @@ public class ProducerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
|
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
|
||||||
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
|
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
|
||||||
tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
|
tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
|
||||||
|
bs.readBoolean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +144,7 @@ public class ProducerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
else {
|
else {
|
||||||
info.setBrokerPath(null);
|
info.setBrokerPath(null);
|
||||||
}
|
}
|
||||||
|
info.setDispatchAsync(dataIn.readBoolean());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +160,7 @@ public class ProducerInfoMarshaller extends BaseCommandMarshaller {
|
||||||
looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
|
looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
|
||||||
looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
|
looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
|
||||||
looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
|
looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
|
||||||
|
dataOut.writeBoolean(info.isDispatchAsync());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,5 +66,6 @@ public class BrokerInfoTest extends BaseCommandTestSupport {
|
||||||
info.setFaultTolerantConfiguration(true);
|
info.setFaultTolerantConfiguration(true);
|
||||||
info.setDuplexConnection(false);
|
info.setDuplexConnection(false);
|
||||||
info.setNetworkConnection(true);
|
info.setNetworkConnection(true);
|
||||||
|
info.setConnectionId(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,5 +60,6 @@ public class ProducerInfoTest extends BaseCommandTestSupport {
|
||||||
}
|
}
|
||||||
info.setBrokerPath(value);
|
info.setBrokerPath(value);
|
||||||
}
|
}
|
||||||
|
info.setDispatchAsync(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue