/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); }
public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) { ConnectionState connectionState = connectionStates.get(connectionId); if (connectionState != null) { connectionState.setConnectionInterruptProcessingComplete(true); Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers(); for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) { ConsumerControl control = new ConsumerControl(); control.setConsumerId(entry.getKey()); control.setPrefetch(entry.getValue().getPrefetchSize()); control.setDestination(entry.getValue().getDestination()); try { if (LOG.isDebugEnabled()) { LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch()); } transport.oneway(control); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to submit control for consumer: " + control.getConsumerId() + " with: " + control.getPrefetch(), ex); } } } stalledConsumers.clear(); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConsumerControl info = (ConsumerControl)o; info.setClose(bs.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setPrefetch(dataIn.readInt()); }
/** * inform the MessageConsumer on the client to change it's prefetch * * @param newPrefetch */ @Override public void updateConsumerPrefetch(int newPrefetch) { if (context != null && context.getConnection() != null && context.getConnection().isManageable()) { ConsumerControl cc = new ConsumerControl(); cc.setConsumerId(info.getConsumerId()); cc.setPrefetch(newPrefetch); context.getConnection().dispatchAsync(cc); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
/** * inform the MessageConsumer on the client to change it's prefetch * * @param newPrefetch */ @Override public void updateConsumerPrefetch(int newPrefetch) { if (context != null && context.getConnection() != null && context.getConnection().isManageable()) { ConsumerControl cc = new ConsumerControl(); cc.setConsumerId(info.getConsumerId()); cc.setPrefetch(newPrefetch); context.getConnection().dispatchAsync(cc); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) { ConnectionState connectionState = connectionStates.get(connectionId); if (connectionState != null) { connectionState.setConnectionInterruptProcessingComplete(true); Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers(); for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) { ConsumerControl control = new ConsumerControl(); control.setConsumerId(entry.getKey()); control.setPrefetch(entry.getValue().getPrefetchSize()); control.setDestination(entry.getValue().getDestination()); try { if (LOG.isDebugEnabled()) { LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch()); } transport.oneway(control); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to submit control for consumer: " + control.getConsumerId() + " with: " + control.getPrefetch(), ex); } } } stalledConsumers.clear(); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) { ConnectionState connectionState = connectionStates.get(connectionId); if (connectionState != null) { connectionState.setConnectionInterruptProcessingComplete(true); Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers(); for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) { ConsumerControl control = new ConsumerControl(); control.setConsumerId(entry.getKey()); control.setPrefetch(entry.getValue().getPrefetchSize()); control.setDestination(entry.getValue().getDestination()); try { if (LOG.isDebugEnabled()) { LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch()); } transport.oneway(control); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to submit control for consumer: " + control.getConsumerId() + " with: " + control.getPrefetch(), ex); } } } stalledConsumers.clear(); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) { ConnectionState connectionState = connectionStates.get(connectionId); if (connectionState != null) { connectionState.setConnectionInterruptProcessingComplete(true); Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers(); for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) { ConsumerControl control = new ConsumerControl(); control.setConsumerId(entry.getKey()); control.setPrefetch(entry.getValue().getPrefetchSize()); control.setDestination(entry.getValue().getDestination()); try { if (LOG.isDebugEnabled()) { LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch()); } transport.oneway(control); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to submit control for consumer: " + control.getConsumerId() + " with: " + control.getPrefetch(), ex); } } } stalledConsumers.clear(); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
public void connectionInterruptProcessingComplete(Transport transport, ConnectionId connectionId) { ConnectionState connectionState = connectionStates.get(connectionId); if (connectionState != null) { connectionState.setConnectionInterruptProcessingComplete(true); Map<ConsumerId, ConsumerInfo> stalledConsumers = connectionState.getRecoveringPullConsumers(); for (Entry<ConsumerId, ConsumerInfo> entry: stalledConsumers.entrySet()) { ConsumerControl control = new ConsumerControl(); control.setConsumerId(entry.getKey()); control.setPrefetch(entry.getValue().getPrefetchSize()); control.setDestination(entry.getValue().getDestination()); try { if (LOG.isDebugEnabled()) { LOG.debug("restored recovering consumer: " + control.getConsumerId() + " with: " + control.getPrefetch()); } transport.oneway(control); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to submit control for consumer: " + control.getConsumerId() + " with: " + control.getPrefetch(), ex); } } } stalledConsumers.clear(); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
/** * inform the MessageConsumer on the client to change it's prefetch * * @param newPrefetch */ @Override public void updateConsumerPrefetch(int newPrefetch) { if (context != null && context.getConnection() != null && context.getConnection().isManageable()) { ConsumerControl cc = new ConsumerControl(); cc.setConsumerId(info.getConsumerId()); cc.setPrefetch(newPrefetch); context.getConnection().dispatchAsync(cc); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
/** * inform the MessageConsumer on the client to change it's prefetch * * @param newPrefetch */ @Override public void updateConsumerPrefetch(int newPrefetch) { if (context != null && context.getConnection() != null && context.getConnection().isManageable()) { ConsumerControl cc = new ConsumerControl(); cc.setConsumerId(info.getConsumerId()); cc.setPrefetch(newPrefetch); context.getConnection().dispatchAsync(cc); } }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); }
/** * inform the MessageConsumer on the client to change it's prefetch * * @param newPrefetch */ public void updateConsumerPrefetch(int newPrefetch) { if (context != null && context.getConnection() != null && context.getConnection().isManageable()) { ConsumerControl cc = new ConsumerControl(); cc.setConsumerId(info.getConsumerId()); cc.setPrefetch(newPrefetch); context.getConnection().dispatchAsync(cc); } }