comparison config/blitz.ssl.config @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 import net.jini.discovery.DiscoveryGroupManagement;
2
3 import java.util.logging.Level;
4
5 import net.jini.security.BasicProxyPreparer;
6
7 import net.jini.jeri.ssl.*;
8 import net.jini.jeri.*;
9
10 import net.jini.constraint.BasicMethodConstraints;
11 import net.jini.core.constraint.InvocationConstraints;
12 import net.jini.core.constraint.Integrity;
13
14 import net.jini.security.*;
15
16 import javax.security.auth.login.LoginContext;
17
18 import org.dancres.blitz.stats.Switch;
19 import org.dancres.blitz.stats.OpSwitch;
20
21 import org.dancres.blitz.config.Persistent;
22 import org.dancres.blitz.config.TimeBarrierPersistent;
23 import org.dancres.blitz.config.Transient;
24
25 org.dancres.blitz {
26 // Default logging level
27 //
28 defaultLogLevel = Level.SEVERE;
29
30 // Examples of setting log levels for specific components
31 //
32 // org_dancres_blitz_disk_SleeveCacheLogLevel = Level.ALL;
33 // org_dancres_blitz_disk_StorageLogLevel = Level.INFO;
34 // org_dancres_blitz_entry_SearchVisitorImplLogLevel = Level.FINE;
35 // org_dancres_blitz_arc_cacheLogLevel = Level.INFO;
36
37 // Published on the proxy as a Name attribute
38 //
39 name = "dancres";
40
41 // Set this to a LoginContext instance when you wish to run the server
42 // as a particular principle
43 //
44 loginContext = new LoginContext("org.dancres.blitz.Server");
45
46 users = KeyStores.getKeyStore("file:lib/truststore", null);
47
48 serverId = KeyStores.getX500Principal("server", users);
49 serverUser = Collections.singleton(KeyStores.getX500Principal("server",
50 users));
51
52 // Location to store meta info and entrys.
53 // NOTE: Each concurrent Blitz instance should use a different directory
54 // for it's logs and persistent state - if this isn't done
55 // "bad things will happen" (TM)
56 //
57 persistDir = "/home/dan/src/jini/space/dbfiles_dancres/";
58
59 // Location of log files - SHOULD BE DIFFERENT FROM ABOVE
60 //
61 logDir = "/sdalog/danlogs/prevlog/";
62 // logDir = "/blitzlog/";
63 // logDir = "/home/dan/src/jini/space/dbfiles_dancres/prevlog/";
64
65 // Maximum number of async write threads
66 // DO NOT CHANGE THIS - BLITZ DOESN'T SUPPORT MORE THAN ONE WRITE THREAD
67 // (YET!)
68 //
69 maxWriteThreads = 1;
70
71 // How long to keep write threads alive in the pool
72 //
73 threadKeepalive = 15;
74
75 // The preferred queue size for pending writes
76 //
77 desiredPendingWrites = 20;
78 // desiredPendingWrites = 0;
79
80 // Size of the berkeley DB cache
81 //
82 // dbCache = 33554432;
83 dbCache = 16777216;
84 // dbCache = 8388608;
85
86 // Configures the maximum number of concurrent Db transactions
87 // Bigger is better! This value has been validated for 64 concurrent
88 // JavaSpace operations
89 //
90 maxDbTxns = 256;
91
92 // Dump Db statistics after every checkpoint if this is true
93 // WARNING: dumping stats is broken in 4.1.25 -
94 // ask Dan (dan@dancres.org) for a patch. This should be fixed in Db 4.2,
95 // will test and then post an update to the website
96 //
97 dumpDbStats = new Boolean(false);
98 // dumpDbStats = new Boolean(true);
99
100 // Dump statistics for write queue usage
101 // When tuning/configuring Blitz for various systems, these stats help
102 // to determine I/O performance requirements and required memory
103 //
104 dumpWQStats = new Boolean(false);
105 // dumpWQStats = new Boolean(true);
106
107 // Turn this on to get reports on checkpointing behaviour - useful for
108 // tuning
109 logCkpts = new Boolean(true);
110
111 // Maximum number of entry instances to cache for a particular Entry type
112 //
113 // entryReposCacheSize = 2000;
114 // entryReposCacheSize = 1000;
115 // entryReposCacheSize = 1;
116 // entryReposCacheSize = 200;
117 entryReposCacheSize = 5000;
118
119 // Non-blocking transactions are used within the entry package to
120 // prevent deadlock. Such transactions can fail and require aborting
121 // should they fail to get a lock. When this happens, the thread
122 // attempting the transaction will backoff by an amount of time dictated
123 // by base_backoff + Random(jitter) ms which should allow the conflicting
124 // transaction time to complete. Format is {base_backoff, jitter}
125 loadBackoff = new int[] {50, 50};
126
127 // The maximum allowable lease time for entries and notify registrations
128 // To permit Lease.FOREVER, set the LeaseBound = 0.
129 // To deny Lease.FOREVER and set an upper limit on lease time set the
130 // LeaseBound to a positive non-zero value in milliseconds
131 //
132 entryLeaseBound = 0;
133 notifyLeaseBound = 0;
134
135 // How often to do an active cleanup of lease expired resources
136 // Value should be ms - 0 disables active cleanup
137 //
138 leaseReapInterval = 0;
139 // leaseReapInterval = 60000;
140 // leaseReapInterval = 10000;
141 // leaseReapInterval = 1800000;
142
143 // Number of OID allocators to use for entries
144 maxOidAllocators = 512;
145
146 // How often to log event allocation to disk
147 //
148 eventgenSaveInterval = 50;
149
150 // How big a jump in notify sequence numbers there should be following
151 // restart/crash
152 //
153 eventgenRestartJump = 1000;
154
155 // Maximum number of task threads to be used in posting remote events
156 // and dispatching blocked takes or reads
157 //
158 maxTaskThreads = 10;
159
160 // storageModel = new Transient();
161 storageModel = new Persistent(false, false, 20, true, 10000, 8192);
162 // storageModel = new TimeBarrierPersistent(false, false, 10000, 65536, 10000);
163
164 // debugPort = 0;
165 debugPort = 12345;
166
167 // Default Stats to make available
168 // stats = new Switch[] {new OpSwitch(OpSwitch.ALL_TYPES,
169 // OpSwitch.TAKE_OPS, true),
170 // new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.READ_OPS, true),
171 // new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.WRITE_OPS, true)};
172
173 // The initial lookup groups to register with - after first boot
174 // this information is held in a meta database and should be configured
175 // via JoinAdmin
176 //
177 initialGroups = new String[]{"JERI_Group1"};
178 // initialGroups = DiscoveryGroupManagement.ALL_GROUPS;
179
180
181 // The initial lookup locators to register with - after first boot
182 // this information is held in a meta database and should be configured
183 // via JoinAdmin
184 //
185 // initialLocators = new LookupLocator[] {new LookupLocator("jini://yakuza/")};
186
187 // The initial attributes to register with - note that these need to be
188 // available as part of the codebase.
189 // This information is held in a meta database and should be configured
190 // via JoinAdmin
191 //
192 // initialAttrs = new Entry[] {};
193
194 // The exporter to use - see the JINI documentation
195 //
196 ILFactory = new ProxyTrustILFactory(new BasicMethodConstraints(
197 new InvocationConstraints(Integrity.YES, null)), null);
198 serverExporter = new BasicJeriExporter(SslServerEndpoint.getInstance(0),
199 ILFactory, false, true);
200
201 // Blitz provides a suitable default for all these but this is how you'd
202 // configure them explicitly
203 //
204 notifyPreparer = new BasicProxyPreparer();
205 recoveredNotifyPreparer = new BasicProxyPreparer();
206 txnPreparer = new BasicProxyPreparer();
207 recoveredTxnPreparer = new BasicProxyPreparer();
208 activationIdPreparer = new BasicProxyPreparer();
209 activationSysPreparer = new BasicProxyPreparer();
210 }