Example usage for java.util.concurrent ConcurrentLinkedQueue forEach

List of usage examples for java.util.concurrent ConcurrentLinkedQueue forEach

Introduction

In this page you can find the example usage for java.util.concurrent ConcurrentLinkedQueue forEach.

Prototype

public void forEach(Consumer<? super E> action) 

Source Link

Usage

From source file:com.github.cambierr.jcollector.sender.OpenTsdbHttp.java

private JSONArray toJson(ConcurrentLinkedQueue<Metric> _metrics) {
    final JSONArray output = new JSONArray();

    _metrics.forEach((Metric t) -> {
        toJson(t, output);/*from   w  w w . ja  v a2 s.co  m*/
    });

    return output;
}