public class AutomaticWorkQueueImpl extends Object implements AutomaticWorkQueue
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_NAME |
Constructor and Description |
---|
AutomaticWorkQueueImpl() |
AutomaticWorkQueueImpl(int max) |
AutomaticWorkQueueImpl(int mqs,
int initialThreads,
int highWaterMark,
int lowWaterMark,
long dequeueTimeout) |
AutomaticWorkQueueImpl(int mqs,
int initialThreads,
int highWaterMark,
int lowWaterMark,
long dequeueTimeout,
String name) |
AutomaticWorkQueueImpl(int max,
String name) |
AutomaticWorkQueueImpl(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(PropertyChangeListener listener) |
void |
addSharedUser() |
void |
execute(Runnable command) |
void |
execute(Runnable work,
long timeout)
Submits a work item for execution at some time in the future, waiting for up to a
specified amount of time for the item to be accepted.
|
int |
getActiveCount() |
protected ThreadPoolExecutor |
getExecutor() |
int |
getHighWaterMark() |
int |
getInitialSize() |
int |
getLargestPoolSize() |
int |
getLowWaterMark() |
long |
getMaxSize()
Gets the maximum size (capacity) of the backing queue.
|
String |
getName()
Get's the name of the workqueue
|
int |
getPoolSize() |
Dictionary<String,String> |
getProperties() |
int |
getShareCount() |
long |
getSize()
Gets the current size of the backing queue.
|
boolean |
isEmpty() |
boolean |
isFull() |
boolean |
isShared() |
boolean |
isShutdown()
Returns true if this object has been shut down.
|
void |
notifyChangeListeners(PropertyChangeEvent event) |
void |
removeChangeListener(PropertyChangeListener listener) |
void |
removeSharedUser() |
void |
schedule(Runnable work,
long delay)
Schedules a work item for execution at some time in the future.
|
void |
setDequeueTimeout(long l) |
void |
setHighWaterMark(int hwm) |
void |
setInitialSize(int initialSize) |
void |
setLowWaterMark(int lwm) |
void |
setName(String s) |
void |
setQueueSize(int size) |
void |
setShared(boolean shared) |
void |
shutdown(boolean processRemainingWorkItems)
Initiates an orderly shutdown.
|
String |
toString() |
void |
update(Dictionary<String,String> config) |
public static final String PROPERTY_NAME
public AutomaticWorkQueueImpl()
public AutomaticWorkQueueImpl(String name)
public AutomaticWorkQueueImpl(int max)
public AutomaticWorkQueueImpl(int max, String name)
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout)
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout, String name)
public void addChangeListener(PropertyChangeListener listener)
public void removeChangeListener(PropertyChangeListener listener)
public void notifyChangeListeners(PropertyChangeEvent event)
public void setShared(boolean shared)
public boolean isShared()
public void addSharedUser()
public void removeSharedUser()
public int getShareCount()
protected ThreadPoolExecutor getExecutor()
public void setName(String s)
public String getName()
AutomaticWorkQueue
getName
in interface AutomaticWorkQueue
public void execute(Runnable work, long timeout)
WorkQueue
public void schedule(Runnable work, long delay)
WorkQueue
public void shutdown(boolean processRemainingWorkItems)
AutomaticWorkQueue
processRemainingWorkItems
is true, waits for all active items to finish execution before returning, otherwise returns
immediately after removing all non active items from the queue.shutdown
in interface AutomaticWorkQueue
public long getMaxSize()
public long getSize()
public boolean isEmpty()
public boolean isFull()
public int getHighWaterMark()
public int getLowWaterMark()
public int getInitialSize()
public void setHighWaterMark(int hwm)
public void setLowWaterMark(int lwm)
public void setInitialSize(int initialSize)
public void setQueueSize(int size)
public void setDequeueTimeout(long l)
public boolean isShutdown()
AutomaticWorkQueue
isShutdown
in interface AutomaticWorkQueue
public int getLargestPoolSize()
public int getPoolSize()
public int getActiveCount()
public void update(Dictionary<String,String> config)
public Dictionary<String,String> getProperties()
Apache CXF