1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.server.config.beans;
21
22
23 import org.apache.directory.server.config.ConfigurationElement;
24
25
26
27
28
29
30
31 public class JdbmIndexBean extends IndexBean
32 {
33
34 private static final int DEFAULT_INDEX_CACHE_SIZE = 100;
35
36
37 private static final int DEFAULT_DUPLICATE_LIMIT = 512;
38
39
40 @ConfigurationElement(attributeType = "ads-indexCacheSize", isOptional = true, defaultValue = "100")
41 private int indexCacheSize = DEFAULT_INDEX_CACHE_SIZE;
42
43
44 @ConfigurationElement(attributeType = "ads-indexNumDupLimit", isOptional = true, defaultValue = "512")
45 private int indexNumDupLimit = DEFAULT_DUPLICATE_LIMIT;
46
47
48 @ConfigurationElement(attributeType = "ads-indexFileName", isOptional = true)
49 private String indexFileName;
50
51
52 @ConfigurationElement(attributeType = "ads-indexWorkingDir", isOptional = true)
53 private String indexWorkingDir;
54
55
56
57
58
59 public JdbmIndexBean()
60 {
61 }
62
63
64
65
66
67
68
69 public int getIndexCacheSize()
70 {
71 return indexCacheSize;
72 }
73
74
75
76
77
78
79
80 public void setIndexCacheSize( int indexCacheSize )
81 {
82 this.indexCacheSize = indexCacheSize;
83 }
84
85
86
87
88
89
90
91
92 public int getIndexNumDupLimit()
93 {
94 return indexNumDupLimit;
95 }
96
97
98
99
100
101
102
103
104 public void setIndexNumDupLimit( int indexNumDupLimit )
105 {
106 this.indexNumDupLimit = indexNumDupLimit;
107 }
108
109
110
111
112
113 public String getIndexFileName()
114 {
115 return indexFileName;
116 }
117
118
119
120
121
122 public void setIndexFileName( String indexFileName )
123 {
124 this.indexFileName = indexFileName;
125 }
126
127
128
129
130
131 public String getIndexWorkingDir()
132 {
133 return indexWorkingDir;
134 }
135
136
137
138
139
140 public void setIndexWorkingDir( String indexWorkingDir )
141 {
142 this.indexWorkingDir = indexWorkingDir;
143 }
144
145
146
147
148
149 @Override
150 public String toString( String tabs )
151 {
152 StringBuilder sb = new StringBuilder();
153
154 sb.append( tabs ).append( "JdbmIndexBean :\n" );
155 sb.append( super.toString( tabs ) );
156 sb.append( toString( tabs, " index file name", indexFileName ) );
157 sb.append( toString( tabs, " index working directory", indexWorkingDir ) );
158 sb.append( toString( tabs, " index cache size", indexCacheSize ) );
159 sb.append( toString( tabs, " index num dup limit", indexNumDupLimit ) );
160
161 return sb.toString();
162 }
163
164
165
166
167
168 @Override
169 public String toString()
170 {
171 return toString( "" );
172 }
173 }