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 JdbmPartitionBean extends PartitionBean
32 {
33
34 @ConfigurationElement(attributeType = "ads-partitionCacheSize", isOptional = true, defaultValue = "-1")
35 private int partitionCacheSize = -1;
36
37
38 @ConfigurationElement(attributeType = "ads-jdbmPartitionOptimizerEnabled", isOptional = true, defaultValue = "true")
39 private boolean jdbmPartitionOptimizerEnabled = true;
40
41
42
43
44
45 public JdbmPartitionBean()
46 {
47 }
48
49
50
51
52
53
54
55
56
57 public void setPartitionCacheSize( int partitionCacheSize )
58 {
59 this.partitionCacheSize = partitionCacheSize;
60 }
61
62
63
64
65
66
67
68 public int getPartitionCacheSize()
69 {
70 return partitionCacheSize;
71 }
72
73
74
75
76
77 public boolean isJdbmPartitionOptimizerEnabled()
78 {
79 return jdbmPartitionOptimizerEnabled;
80 }
81
82
83
84
85
86
87
88 public void setJdbmPartitionOptimizerEnabled( boolean jdbmPartitionOptimizerEnabled )
89 {
90 this.jdbmPartitionOptimizerEnabled = jdbmPartitionOptimizerEnabled;
91 }
92
93
94
95
96
97 public String toString( String tabs )
98 {
99 StringBuilder sb = new StringBuilder();
100
101 sb.append( tabs ).append( "JdbmPartitionBean :\n" );
102 sb.append( super.toString( tabs ) );
103 sb.append( tabs ).append( " partition cache size : " ).append( partitionCacheSize ).append( '\n' );
104 sb.append( toString( tabs, " jdbm partition optimizer enabled", jdbmPartitionOptimizerEnabled ) );
105
106 return sb.toString();
107 }
108
109
110
111
112
113 public String toString()
114 {
115 return toString( "" );
116 }
117 }