Example usage for com.google.common.util.concurrent ForwardingBlockingQueue subclass-usage

List of usage examples for com.google.common.util.concurrent ForwardingBlockingQueue subclass-usage

Introduction

In this page you can find the example usage for com.google.common.util.concurrent ForwardingBlockingQueue subclass-usage.

Usage

From source file com.vmware.thinapp.common.util.concurrent.BoundedBlockingQueueWithCallback.java

/**
 * A bounded blocking queue which fires a callback when items are dropped from
 * the queue:
 *  - when an item is added to the queue, and the queue is full, instead of
 *    prohibiting the add or blocking the thread attempting to add the element,
 *  - this class takes the oldest element in the queue and removes it