KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > msg > MessageRecycler


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.msg;
5
6 import java.util.Set JavaDoc;
7
8 public interface MessageRecycler {
9   
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 JavaDoc 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 JavaDoc key);
24
25 }
26
Popular Tags