public class FastQueue extends Object
Constructor and Description |
---|
FastQueue()
Generate Queue SingleRemoveSynchronizedAddLock and set add and wait
Timeouts
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(ChannelMessage msg,
Member[] destination,
InterceptorPayload payload)
Add new data to the queue.
|
long |
getAddWaitTimeout()
get current add wait timeout
|
int |
getMaxQueueLength() |
int |
getMaxSize() |
long |
getRemoveWaitTimeout()
get current remove wait timeout
|
int |
getSize() |
boolean |
isEnabled() |
LinkObject |
remove()
Remove the complete queued object list.
|
void |
setAddWaitTimeout(long timeout)
Set add wait timeout (default 10000 msec)
|
void |
setEnabled(boolean enable) |
void |
setMaxQueueLength(int length) |
void |
setMaxSize(int size) |
void |
setRemoveWaitTimeout(long timeout)
set remove wait timeout ( default 30000 msec)
|
void |
start()
start queuing
|
void |
stop()
start queuing
|
public FastQueue()
public long getAddWaitTimeout()
public void setAddWaitTimeout(long timeout)
timeout
- public long getRemoveWaitTimeout()
public void setRemoveWaitTimeout(long timeout)
timeout
- public int getMaxQueueLength()
public void setMaxQueueLength(int length)
public boolean isEnabled()
public void setEnabled(boolean enable)
public int getMaxSize()
public void setMaxSize(int size)
size
- public void start()
public void stop()
public int getSize()
public boolean add(ChannelMessage msg, Member[] destination, InterceptorPayload payload)
public LinkObject remove()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.