View Javadoc

1   /*
2    * $Id: TakingQueueInfoDelegate.java 22855 2011-09-04 17:45:44Z mike.schilling $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.util.queue;
11  
12  import org.mule.api.store.ObjectStoreException;
13  
14  import java.io.Serializable;
15  
16  /**
17   * A QueueInfoDelegate that can take objects directly from its store
18   */
19  public interface TakingQueueInfoDelegate extends QueueInfoDelegate
20  {
21      /**
22       * Poll the queue for its first member, and, if there is one, remove and return the corresponding object
23       * from the object store
24       */
25      Serializable takeFromObjectStore(long timeout) throws InterruptedException;
26  
27      void writeToObjectStore(Serializable data) throws InterruptedException,ObjectStoreException;
28  }