org.apache.activemq.broker.region.Queue.getStoreUsageHighWaterMark()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.apache.activemq.broker.region.Queue.getStoreUsageHighWaterMark方法的一些代码示例,展示了Queue.getStoreUsageHighWaterMark的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.getStoreUsageHighWaterMark方法的具体详情如下:
包路径:org.apache.activemq.broker.region.Queue
类名称:Queue
方法名:getStoreUsageHighWaterMark

Queue.getStoreUsageHighWaterMark介绍

暂无

代码示例

代码示例来源:origin: apache/activemq

private void checkUsage(ConnectionContext context,ProducerBrokerExchange producerBrokerExchange, Message message) throws ResourceAllocationException, IOException, InterruptedException {
  if (message.isPersistent()) {
    if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
      final String logMessage = "Persistent store is Full, " + getStoreUsageHighWaterMark() + "% of "
        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
        + message.getProducerId() + ") to prevent flooding "
        + getActiveMQDestination().getQualifiedName() + "."
        + " See http://activemq.apache.org/producer-flow-control.html for more info";
      waitForSpace(context, producerBrokerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
    }
  } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
    final String logMessage = "Temp Store is Full ("
        + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit()
        +"). Stopping producer (" + message.getProducerId()
      + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
      + " See http://activemq.apache.org/producer-flow-control.html for more info";
    waitForSpace(context, producerBrokerExchange, messages.getSystemUsage().getTempUsage(), logMessage);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

private void checkUsage(ConnectionContext context,ProducerBrokerExchange producerBrokerExchange, Message message) throws ResourceAllocationException, IOException, InterruptedException {
  if (message.isPersistent()) {
    if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
      final String logMessage = "Persistent store is Full, " + getStoreUsageHighWaterMark() + "% of "
        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
        + message.getProducerId() + ") to prevent flooding "
        + getActiveMQDestination().getQualifiedName() + "."
        + " See http://activemq.apache.org/producer-flow-control.html for more info";
      waitForSpace(context, producerBrokerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
    }
  } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
    final String logMessage = "Temp Store is Full ("
        + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit()
        +"). Stopping producer (" + message.getProducerId()
      + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
      + " See http://activemq.apache.org/producer-flow-control.html for more info";
    waitForSpace(context, producerBrokerExchange, messages.getSystemUsage().getTempUsage(), logMessage);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-broker

private void checkUsage(ConnectionContext context,ProducerBrokerExchange producerBrokerExchange, Message message) throws ResourceAllocationException, IOException, InterruptedException {
  if (message.isPersistent()) {
    if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
      final String logMessage = "Persistent store is Full, " + getStoreUsageHighWaterMark() + "% of "
        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
        + message.getProducerId() + ") to prevent flooding "
        + getActiveMQDestination().getQualifiedName() + "."
        + " See http://activemq.apache.org/producer-flow-control.html for more info";
      waitForSpace(context, producerBrokerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
    }
  } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
    final String logMessage = "Temp Store is Full ("
        + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit()
        +"). Stopping producer (" + message.getProducerId()
      + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
      + " See http://activemq.apache.org/producer-flow-control.html for more info";
    waitForSpace(context, producerBrokerExchange, messages.getSystemUsage().getTempUsage(), logMessage);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

private void checkUsage(ConnectionContext context,ProducerBrokerExchange producerBrokerExchange, Message message) throws ResourceAllocationException, IOException, InterruptedException {
  if (message.isPersistent()) {
    if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
      final String logMessage = "Persistent store is Full, " + getStoreUsageHighWaterMark() + "% of "
        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
        + message.getProducerId() + ") to prevent flooding "
        + getActiveMQDestination().getQualifiedName() + "."
        + " See http://activemq.apache.org/producer-flow-control.html for more info";
      waitForSpace(context, producerBrokerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
    }
  } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
    final String logMessage = "Temp Store is Full ("
        + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit()
        +"). Stopping producer (" + message.getProducerId()
      + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
      + " See http://activemq.apache.org/producer-flow-control.html for more info";
    waitForSpace(context, producerBrokerExchange, messages.getSystemUsage().getTempUsage(), logMessage);
  }
}

代码示例来源:origin: pierre/meteo

private void checkUsage(ConnectionContext context, Message message) throws ResourceAllocationException, IOException, InterruptedException {
  if (message.isPersistent()) {
    if (store != null && systemUsage.getStoreUsage().isFull(getStoreUsageHighWaterMark())) {
      final String logMessage = "Usage Manager Store is Full, " + getStoreUsageHighWaterMark() + "% of "
        + systemUsage.getStoreUsage().getLimit() + ". Stopping producer ("
        + message.getProducerId() + ") to prevent flooding "
        + getActiveMQDestination().getQualifiedName() + "."
        + " See http://activemq.apache.org/producer-flow-control.html for more info";
      waitForSpace(context, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);
    }
  } else if (messages.getSystemUsage() != null && systemUsage.getTempUsage().isFull()) {
    final String logMessage = "Usage Manager Temp Store is Full ("
        + systemUsage.getTempUsage().getPercentUsage() + "% of " + systemUsage.getTempUsage().getLimit() 
        +"). Stopping producer (" + message.getProducerId()
      + ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
      + " See http://activemq.apache.org/producer-flow-control.html for more info";
    
    waitForSpace(context, messages.getSystemUsage().getTempUsage(), logMessage);
  }
}

相关文章

Queue类方法