01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.msg;
05:
06: import java.util.Set;
07:
08: public interface MessageRecycler {
09:
10: /*
11: * adds a DSOMessage that needs to be recycled at a latter point in time, along with
12: * the set of keys that needs to be processed before the message can be recycled. These
13: * keys should be unique across the calls.
14: */
15: public void addMessage(DSOMessageBase message, Set keys);
16:
17: /*
18: * Indicates that the key is processed. The message associated with the key will be recycled
19: * iff there are no more keys associated with it.
20: *
21: * @returns true if the Message associated with this key was recycled.
22: */
23: public boolean recycle(Object key);
24:
25: }
|