1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
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>
22 * A background-save evictor is an evictor that saves updates
23 * asynchronously in a background thread.
27 local interface BackgroundSaveEvictor extends Evictor
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.
35 * @param id The identity of the Ice object.
37 * @throws Ice.NotRegisteredException Raised if this identity was not
38 * registered with the evictor.
40 * @throws DatabaseException Raised if a database failure occurred.
47 void keep(Ice::Identity id);
51 * Like {@link #keep}, but with a facet. Calling <tt>keep(id)</tt>
52 * is equivalent to calling {@link #keepFacet} with an empty facet.
54 * @param id The identity of the Ice object.
56 * @param facet The facet. An empty facet means the default
59 * @throws Ice.NotRegisteredException Raised if this identity was not
60 * registered with the evictor.
62 * @throws DatabaseException Raised if a database failure occurred.
69 void keepFacet(Ice::Identity id, string facet);
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.
78 * @param id The identity of the Ice object.
80 * @throws Ice.NotRegisteredException Raised if this object was not
81 * locked with {link #keep} or {@link #keepFacet}.
87 void release(Ice::Identity id);
91 * Like {@link #release}, but with a facet. Calling <tt>release(id)</tt>
92 * is equivalent to calling {@link #releaseFacet} with an empty facet.
94 * @param id The identity of the Ice object.
96 * @param facet The facet. An empty facet means the default
99 * @throws Ice.NotRegisteredException Raised if this object was not
100 * locked with {@link #keep} or {@link #keepFacet}.
106 void releaseFacet(Ice::Identity id, string facet);