public class Channel<T> extends Object
Channel
is a utility wrapper for LinkedBlockingQueue
. Although its visibility is
currently public
, it is not considered an official part of the NATS API and may be
deprecated at any time.Constructor and Description |
---|
Channel() |
Channel(Collection<T> collection) |
Channel(int capacity) |
Channel(LinkedBlockingQueue<T> queue) |
public Channel()
public Channel(LinkedBlockingQueue<T> queue)
public Channel(int capacity)
public Channel(Collection<T> collection)
public T get()
public T get(long timeout) throws TimeoutException
TimeoutException
public T get(long timeout, TimeUnit unit) throws TimeoutException
TimeoutException
public T poll()
public boolean add(T item)
public boolean add(T item, long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public void close()
public boolean isClosed()
public int getCount()
Copyright © 2015–2016 Apcera, Inc.. All rights reserved.