Examples of CircularFifoBuffer


Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

  public DbusLogAccumulator() {
    this(MAX_NUMBER_OF_LOG_MSGS);
  }

  public DbusLogAccumulator(int maxNumberMsgs) {
    _msgs = new CircularFifoBuffer(maxNumberMsgs);
    reset();
  }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

  public NthLastModifiedTimeTracker(int numTimesToTrack) {
    if (numTimesToTrack < 1) {
      throw new IllegalArgumentException(
          "numTimesToTrack must be greater than zero (you requested " + numTimesToTrack + ")");
    }
    lastModifiedTimesMillis = new CircularFifoBuffer(numTimesToTrack);
    initLastModifiedTimesMillis();
  }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

public class NotificationList<T>  {
  private static NotificationList<String> nl = null;
  private static Buffer list = null;
 
  private NotificationList() { 
    list = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(10));
  }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

  public NthLastModifiedTimeTracker(int numTimesToTrack) {
    if (numTimesToTrack < 1) {
      throw new IllegalArgumentException(
          "numTimesToTrack must be greater than zero (you requested " + numTimesToTrack + ")");
    }
    lastModifiedTimesMillis = new CircularFifoBuffer(numTimesToTrack);
    initLastModifiedTimesMillis();
  }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

    public NthLastModifiedTimeTracker(int numTimesToTrack) {
        if (numTimesToTrack < 1) {
            throw new IllegalArgumentException("numTimesToTrack must be greater than zero (you requested "
                + numTimesToTrack + ")");
        }
        lastModifiedTimesMillis = new CircularFifoBuffer(numTimesToTrack);
        initLastModifiedTimesMillis();
    }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

      // this can happen if the first value is an error and then real values arrive. this is possible if market
      // data subscriptions take time to set up. in that case the history will initially be null (because error
      // sentinel types aren't in s_historyTypes) and then when a valid value arrives the type can be checked and
      // history created if required
      if (_history == null && s_historyTypes.contains(latestValue.getClass())) {
        _history = new CircularFifoBuffer(MAX_HISTORY_SIZE);
      }
      if (_history != null) {
        _history.add(latestValue);
      }
    }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

    this(10);
  }

  public PeekQueueGuage(final int size) {
    this.size = size;
    this.buffer = new CircularFifoBuffer(size);
  }
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

    this.col = col;
   
    // initialize all buffers
    this.timeMeasureMapGlobal = new ConcurrentHashMap<TimeMeasureItemGlobal, CircularFifoBuffer>();
    for (TimeMeasureItemGlobal timeMeasureItem : TimeMeasureItemGlobal.values()) {
      this.timeMeasureMapGlobal.put(timeMeasureItem, new CircularFifoBuffer(this.configuredFps * SECONDS));
    }
    this.timeMeasureMapOutput = new ConcurrentHashMap<IOutput, Map<TimeMeasureItemOutput, CircularFifoBuffer>>();
    this.outputList = new ArrayList<IOutput>();

    startTime = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.commons.collections.buffer.CircularFifoBuffer

      this.timeMeasureMapOutput.put(output, new HashMap<TimeMeasureItemOutput, CircularFifoBuffer>());
      this.outputList.add(output);
    }
    // make sure a circularFifoBuffer instance was construct for the given outputValueEnum
    if (!this.timeMeasureMapOutput.get(output).containsKey(timeMeasureItem)) {
      this.timeMeasureMapOutput.get(output).put(timeMeasureItem, new CircularFifoBuffer(this.configuredFps * SECONDS));
    }
    // add time to internal buffer instance
    this.timeMeasureMapOutput.get(output).get(timeMeasureItem).add(time);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.