01: /**
02: * An interface for buffers
03: * Figure 4.9
04: */
05:
06: public interface Buffer
07: {
08: /**
09: * insert an item into the Buffer.
10: * Note this may be either a blocking
11: * or non-blocking operation.
12: */
13: // producer calls this method
14: public abstract void insert(Object item);
15:
16: /**
17: * remove an item from the Buffer.
18: * Note this may be either a blocking
19: * or non-blocking operation.
20: */
21: // consumer calls this method
22: public abstract Object remove();
23: }