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