Package org.apache.cxf.workqueue
Class AutomaticWorkQueueImpl
java.lang.Object
org.apache.cxf.workqueue.AutomaticWorkQueueImpl
- All Implemented Interfaces:
Executor
,AutomaticWorkQueue
,WorkQueue
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAutomaticWorkQueueImpl
(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) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(PropertyChangeListener listener) void
void
void
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
protected ThreadPoolExecutor
int
int
int
int
long
Gets the maximum size (capacity) of the backing queue.getName()
Get's the name of the workqueueint
int
long
getSize()
Gets the current size of the backing queue.boolean
isEmpty()
boolean
isFull()
boolean
isShared()
boolean
Returns true if this object has been shut down.void
void
removeChangeListener
(PropertyChangeListener listener) void
void
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
void
setQueueSize
(int size) void
setShared
(boolean shared) void
shutdown
(boolean processRemainingWorkItems) Initiates an orderly shutdown.toString()
void
update
(Dictionary<String, String> config)
-
Field Details
-
PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
AutomaticWorkQueueImpl
public AutomaticWorkQueueImpl() -
AutomaticWorkQueueImpl
-
AutomaticWorkQueueImpl
public AutomaticWorkQueueImpl(int max) -
AutomaticWorkQueueImpl
-
AutomaticWorkQueueImpl
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout) -
AutomaticWorkQueueImpl
public AutomaticWorkQueueImpl(int mqs, int initialThreads, int highWaterMark, int lowWaterMark, long dequeueTimeout, String name)
-
-
Method Details
-
addChangeListener
-
removeChangeListener
-
notifyChangeListeners
-
getExecutor
-
setName
-
getName
Description copied from interface:AutomaticWorkQueue
Get's the name of the workqueue- Specified by:
getName
in interfaceAutomaticWorkQueue
- Returns:
- the name
-
toString
-
execute
-
execute
Description copied from interface:WorkQueue
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. -
schedule
Description copied from interface:WorkQueue
Schedules a work item for execution at some time in the future. -
shutdown
public void shutdown(boolean processRemainingWorkItems) Description copied from interface:AutomaticWorkQueue
Initiates an orderly shutdown. IfprocessRemainingWorkItems
is true, waits for all active items to finish execution before returning, otherwise returns immediately after removing all non active items from the queue.- Specified by:
shutdown
in interfaceAutomaticWorkQueue
-
getMaxSize
public long getMaxSize()Gets the maximum size (capacity) of the backing queue.- Returns:
- the maximum size (capacity) of the backing queue.
-
getSize
public long getSize()Gets the current size of the backing queue.- Returns:
- the current size of the backing queue.
-
isEmpty
public boolean isEmpty() -
isFull
public boolean isFull() -
getHighWaterMark
public int getHighWaterMark() -
getLowWaterMark
public int getLowWaterMark() -
getInitialSize
public int getInitialSize() -
setHighWaterMark
public void setHighWaterMark(int hwm) -
setLowWaterMark
public void setLowWaterMark(int lwm) -
setInitialSize
public void setInitialSize(int initialSize) -
setQueueSize
public void setQueueSize(int size) -
setDequeueTimeout
public void setDequeueTimeout(long l) -
isShutdown
public boolean isShutdown()Description copied from interface:AutomaticWorkQueue
Returns true if this object has been shut down.- Specified by:
isShutdown
in interfaceAutomaticWorkQueue
- Returns:
- true if this object has been shut down.
-
getLargestPoolSize
public int getLargestPoolSize() -
getPoolSize
public int getPoolSize() -
getActiveCount
public int getActiveCount() -
update
-
getProperties
-