Tabnine Logo
ConsumerControl.setPrefetch
Code IndexAdd Tabnine to your IDE (free)

How to use
setPrefetch
method
in
org.apache.activemq.command.ConsumerControl

Best Java code snippets using org.apache.activemq.command.ConsumerControl.setPrefetch (Showing top 20 results out of 315)

Refine searchRefine arrow

  • ConsumerControl.setClose
  • ConsumerControl.setConsumerId
origin: apache/activemq

/**
 * 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());
}
origin: apache/activemq

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();
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: apache/activemq

/**
 * 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);
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: apache/activemq

/**
 * 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);
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: org.apache.activemq/activemq-client

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();
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: org.apache.activemq/activemq-osgi

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();
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: pierre/meteo

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();
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: org.apache.activemq/activemq-all

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();
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: org.apache.activemq/activemq-broker

/**
 * 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);
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: org.apache.activemq/activemq-broker

/**
 * 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);
  }
}
origin: apache/activemq

/**
 * 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());
}
origin: pierre/meteo

/**
 * 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);
  }
}
org.apache.activemq.commandConsumerControlsetPrefetch

Popular methods of ConsumerControl

  • <init>
  • setConsumerId
  • setDestination
  • getConsumerId
  • getPrefetch
  • getDestination
  • setClose
  • isClose
  • isFlush
  • isStart
  • isStop
  • setFlush
  • isStop,
  • setFlush,
  • setStart,
  • setStop

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • Kernel (java.awt.image)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now