Package EDU.oswego.cs.dl.util.concurrent.misc

Source Code of EDU.oswego.cs.dl.util.concurrent.misc.FIFOSlot

/*    */ package EDU.oswego.cs.dl.util.concurrent.misc;
/*    */
/*    */ import EDU.oswego.cs.dl.util.concurrent.BoundedChannel;
/*    */ import EDU.oswego.cs.dl.util.concurrent.FIFOSemaphore;
/*    */ import EDU.oswego.cs.dl.util.concurrent.Slot;
/*    */
/*    */ public class FIFOSlot
/*    */   implements BoundedChannel
/*    */ {
/*    */   private final Slot slot_;
/*    */
/*    */   public FIFOSlot()
/*    */   {
/*    */     try
/*    */     {
/* 12 */       this.slot_ = new Slot(FIFOSemaphore.class);
/*    */     }
/*    */     catch (Exception ex) {
/* 15 */       ex.printStackTrace();
/* 16 */       throw new Error("Cannot make Slot?");
/*    */     }
/*    */   }
/*    */
/*    */   public void put(Object item) throws InterruptedException {
/* 21 */     this.slot_.put(item);
/*    */   }
/*    */
/*    */   public boolean offer(Object item, long msecs) throws InterruptedException {
/* 25 */     return this.slot_.offer(item, msecs);
/*    */   }
/*    */
/*    */   public Object take() throws InterruptedException {
/* 29 */     return this.slot_.take();
/*    */   }
/*    */
/*    */   public Object poll(long msecs) throws InterruptedException {
/* 33 */     return this.slot_.poll(msecs);
/*    */   }
/*    */   public int capacity() {
/* 36 */     return 1;
/*    */   }
/*    */   public Object peek() {
/* 39 */     return this.slot_.peek();
/*    */   }
/*    */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
* Qualified Name:     EDU.oswego.cs.dl.util.concurrent.misc.FIFOSlot
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.misc.FIFOSlot

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.