1
2
3
4
5
6
7
8
9
10
11 package org.mule.util.queue;
12
13 import org.mule.api.NamedObject;
14 import org.mule.api.store.ObjectStoreException;
15
16 import java.io.Serializable;
17
18
19
20
21 public interface Queue extends NamedObject
22 {
23
24
25
26 int size();
27
28
29
30
31 void put(Serializable object) throws InterruptedException, ObjectStoreException;
32
33
34
35
36
37
38 Serializable take() throws InterruptedException;
39
40 void untake(Serializable item) throws InterruptedException, ObjectStoreException;
41
42 Serializable peek() throws InterruptedException;
43
44 Serializable poll(long timeout) throws InterruptedException;
45
46 boolean offer(Serializable object, long timeout) throws InterruptedException, ObjectStoreException;
47
48 }