org.apache.cxf.workqueue
Class AutomaticWorkQueueImpl

java.lang.Object
  extended by org.apache.cxf.workqueue.AutomaticWorkQueueImpl
All Implemented Interfaces:
Executor, org.apache.cxf.workqueue.AutomaticWorkQueue, org.apache.cxf.workqueue.WorkQueue
Direct Known Subclasses:
OSGiAutomaticWorkQueue

public class AutomaticWorkQueueImpl
extends Object
implements org.apache.cxf.workqueue.AutomaticWorkQueue


Constructor Summary
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)
           
 
Method Summary
 void addSharedUser()
           
 void execute(Runnable command)
           
 void execute(Runnable work, long timeout)
           
 int getActiveCount()
           
protected  ThreadPoolExecutor getExecutor()
           
 int getHighWaterMark()
           
 int getLargestPoolSize()
           
 int getLowWaterMark()
           
 long getMaxSize()
          Gets the maximum size (capacity) of the backing queue.
 String getName()
           
 int getPoolSize()
           
 int getShareCount()
           
 long getSize()
          Gets the current size of the backing queue.
 boolean isEmpty()
           
 boolean isShared()
           
 boolean isShutdown()
           
 void removeSharedUser()
           
 void schedule(Runnable work, long delay)
           
 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 b)
           
 void shutdown(boolean processRemainingWorkItems)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutomaticWorkQueueImpl

public AutomaticWorkQueueImpl()

AutomaticWorkQueueImpl

public AutomaticWorkQueueImpl(String name)

AutomaticWorkQueueImpl

public AutomaticWorkQueueImpl(int max)

AutomaticWorkQueueImpl

public AutomaticWorkQueueImpl(int max,
                              String name)

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 Detail

setShared

public void setShared(boolean b)

isShared

public boolean isShared()

addSharedUser

public void addSharedUser()

removeSharedUser

public void removeSharedUser()

getShareCount

public int getShareCount()

getExecutor

protected ThreadPoolExecutor getExecutor()

setName

public void setName(String s)

getName

public String getName()
Specified by:
getName in interface org.apache.cxf.workqueue.AutomaticWorkQueue

toString

public String toString()
Overrides:
toString in class Object

execute

public void execute(Runnable command)
Specified by:
execute in interface Executor

execute

public void execute(Runnable work,
                    long timeout)
Specified by:
execute in interface org.apache.cxf.workqueue.WorkQueue

schedule

public void schedule(Runnable work,
                     long delay)
Specified by:
schedule in interface org.apache.cxf.workqueue.WorkQueue

shutdown

public void shutdown(boolean processRemainingWorkItems)
Specified by:
shutdown in interface org.apache.cxf.workqueue.AutomaticWorkQueue

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()

getHighWaterMark

public int getHighWaterMark()

getLowWaterMark

public int getLowWaterMark()

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()
Specified by:
isShutdown in interface org.apache.cxf.workqueue.AutomaticWorkQueue

getLargestPoolSize

public int getLargestPoolSize()

getPoolSize

public int getPoolSize()

getActiveCount

public int getActiveCount()


Apache CXF