ICE 3.4.2
[php5-ice-freebsdport.git] / slice / Freeze / BackgroundSaveEvictor.ice
blob7c97bd634012af17052db79cc93da8205cf17eec
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 #ifndef FREEZE_BACKGROUND_SAVE_EVICTOR_ICE
11 #define FREEZE_BACKGROUND_SAVE_EVICTOR_ICE
13 [["cpp:header-ext:h"]]
15 #include <Freeze/Evictor.ice>
17 module Freeze
20 /**
21  * 
22  * A background-save evictor is an evictor that saves updates 
23  * asynchronously in a background thread.
24  *
25  **/
27 local interface BackgroundSaveEvictor extends Evictor
29     /**
30      *
31      * Lock this object in the evictor cache. This lock can be released
32      * by {@link #release} or {@link #remove}. {@link #release} releases only one lock, while
33      * {@link #remove} releases all the locks.
34      *
35      * @param id The identity of the Ice object.
36      *
37      * @throws Ice.NotRegisteredException Raised if this identity was not 
38      * registered with the evictor.
39      *
40      * @throws DatabaseException Raised if a database failure occurred.
41      *
42      * @see #keepFacet
43      * @see #release
44      * @see #remove
45      *
46      **/
47      void keep(Ice::Identity id);
49     /**
50      *
51      * Like {@link #keep}, but with a facet. Calling <tt>keep(id)</tt> 
52      * is equivalent to calling {@link #keepFacet} with an empty facet.
53      *
54      * @param id The identity of the Ice object.
55      *
56      * @param facet The facet. An empty facet means the default
57      * facet.
58      *
59      * @throws Ice.NotRegisteredException Raised if this identity was not 
60      * registered with the evictor.
61      *
62      * @throws DatabaseException Raised if a database failure occurred.
63      *
64      * @see #keep
65      * @see #releaseFacet
66      * @see #removeFacet
67      *
68      **/
69     void keepFacet(Ice::Identity id, string facet);
72     /**
73      *
74      * Release a lock acquired by {@link #keep}. Once all the locks on an
75      * object have been released, the object is again subject to the 
76      * normal eviction strategy.
77      *
78      * @param id The identity of the Ice object.
79      *
80      * @throws Ice.NotRegisteredException Raised if this object was not
81      * locked with {link #keep} or {@link #keepFacet}.
82      *
83      * @see #keepFacet
84      * @see #release
85      *
86      **/
87     void release(Ice::Identity id);
89     /**
90      *
91      * Like {@link #release}, but with a facet. Calling <tt>release(id)</tt> 
92      * is equivalent to calling {@link #releaseFacet} with an empty facet.
93      *
94      * @param id The identity of the Ice object.
95      *
96      * @param facet The facet. An empty facet means the default
97      * facet.
98      *
99      * @throws Ice.NotRegisteredException Raised if this object was not
100      * locked with {@link #keep} or {@link #keepFacet}.
101      *
102      * @see #keep
103      * @see #releaseFacet
104      *
105      **/
106     void releaseFacet(Ice::Identity id, string facet);
112 #endif