public abstract class RemoteQueueTransferScheduler extends AbstractQueue<Runnable> implements BlockingQueue<Runnable>, QueueListener, RemoteQueueTransferSchedulerMBean
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxConcurrentRequests |
protected Map<Queue,LocalToRemoteQueueProcessor> |
processors |
protected AtomicLong |
scheduledCount |
| Constructor and Description |
|---|
RemoteQueueTransferScheduler(int maxConcurrentRequests,
QueueManager queueManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Runnable runnable) |
void |
addLocalToRemoteQueueProcessor(Queue queue,
LocalToRemoteQueueProcessor processor) |
boolean |
contains(Object o) |
abstract int |
drainTo(Collection<? super Runnable> c) |
int |
drainTo(Collection<? super Runnable> c,
int maxElements) |
int |
getLocalToRemoteQueueProcessorSize() |
int |
getMaxConcurrentRequests() |
long |
getScheduledCount() |
int |
getWorkListSize() |
Iterator<Runnable> |
iterator() |
boolean |
offer(Runnable runnable) |
boolean |
offer(Runnable runnable,
long timeout,
TimeUnit unit) |
abstract void |
onNotEmpty(Queue queue) |
Runnable |
peek() |
Runnable |
poll() |
Runnable |
poll(long timeout,
TimeUnit unit) |
void |
put(Runnable runnable) |
protected void |
registerMBean(QueueManager queueManager) |
int |
remainingCapacity() |
boolean |
remove(Object o) |
void |
removeLocalToRemoteQueueProcessor(Queue queue) |
void |
setMaxConcurrentRequests(int maxConcurrentRequests) |
abstract int |
size() |
abstract Runnable |
take() |
addAll, clear, element, removecontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringprotected final Map<Queue,LocalToRemoteQueueProcessor> processors
protected final AtomicLong scheduledCount
protected int maxConcurrentRequests
public RemoteQueueTransferScheduler(int maxConcurrentRequests,
QueueManager queueManager)
protected void registerMBean(QueueManager queueManager)
public void addLocalToRemoteQueueProcessor(Queue queue, LocalToRemoteQueueProcessor processor)
public void removeLocalToRemoteQueueProcessor(Queue queue)
public int getMaxConcurrentRequests()
getMaxConcurrentRequests in interface RemoteQueueTransferSchedulerMBeanpublic void setMaxConcurrentRequests(int maxConcurrentRequests)
setMaxConcurrentRequests in interface RemoteQueueTransferSchedulerMBeanpublic int getLocalToRemoteQueueProcessorSize()
getLocalToRemoteQueueProcessorSize in interface RemoteQueueTransferSchedulerMBeanpublic int getWorkListSize()
getWorkListSize in interface RemoteQueueTransferSchedulerMBeanpublic long getScheduledCount()
getScheduledCount in interface RemoteQueueTransferSchedulerMBeanpublic abstract void onNotEmpty(Queue queue)
onNotEmpty in interface QueueListenerpublic abstract Runnable take() throws InterruptedException
take in interface BlockingQueue<Runnable>InterruptedExceptionpublic abstract int drainTo(Collection<? super Runnable> c)
drainTo in interface BlockingQueue<Runnable>public abstract int size()
size in interface Collection<Runnable>size in class AbstractCollection<Runnable>public boolean add(Runnable runnable)
add in interface Collection<Runnable>add in interface BlockingQueue<Runnable>add in interface Queue<Runnable>add in class AbstractQueue<Runnable>public boolean contains(Object o)
contains in interface Collection<Runnable>contains in interface BlockingQueue<Runnable>contains in class AbstractCollection<Runnable>public int drainTo(Collection<? super Runnable> c, int maxElements)
drainTo in interface BlockingQueue<Runnable>public boolean offer(Runnable runnable)
public boolean offer(Runnable runnable, long timeout, TimeUnit unit)
offer in interface BlockingQueue<Runnable>public Runnable poll(long timeout, TimeUnit unit)
poll in interface BlockingQueue<Runnable>public void put(Runnable runnable)
put in interface BlockingQueue<Runnable>public int remainingCapacity()
remainingCapacity in interface BlockingQueue<Runnable>public boolean remove(Object o)
remove in interface Collection<Runnable>remove in interface BlockingQueue<Runnable>remove in class AbstractCollection<Runnable>Copyright © 2009-2014 Cloudhopper by Twitter. All Rights Reserved.