All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.util.LimitedLinkedBlockingQueue Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.util;

import java.util.Collection;
import java.util.concurrent.LinkedBlockingQueue;

public class LimitedLinkedBlockingQueue extends LinkedBlockingQueue {
    public LimitedLinkedBlockingQueue() {
    }

    public LimitedLinkedBlockingQueue(Collection c) {
        super(c);
    }

    public LimitedLinkedBlockingQueue(int capacity) {
        super(capacity);
    }

    @Override
    public boolean offer(T t) {
        try {
            put(t);
            return true;
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
        }
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy