1. /*
  2. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package com.sun.corba.se.spi.orbutil.threadpool;
  6. public interface WorkQueue
  7. {
  8. /**
  9. * This method is used to add work to the WorkQueue
  10. */
  11. public void addWork(Work aWorkItem);
  12. /**
  13. * This method will return the name of the WorkQueue.
  14. */
  15. public String getName();
  16. /**
  17. * Returns the total number of Work items added to the Queue.
  18. */
  19. public long totalWorkItemsAdded();
  20. /**
  21. * Returns the total number of Work items in the Queue to be processed.
  22. */
  23. public int workItemsInQueue();
  24. /**
  25. * Returns the average time a work item is waiting in the queue before
  26. * getting processed.
  27. */
  28. public long averageTimeInQueue();
  29. /**
  30. * Set the ThreadPool instance servicing this WorkQueue
  31. */
  32. public void setThreadPool(ThreadPool aThreadPool);
  33. /**
  34. * Get the ThreadPool instance servicing this WorkQueue
  35. */
  36. public ThreadPool getThreadPool();
  37. }
  38. // End of file.