Mercurial > hg > blitz_condensed
comparison src/org/dancres/blitz/config/Fifo.java @ 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 package org.dancres.blitz.config; | |
2 | |
3 /** | |
4 <p>Fifo constraint causes searching of Entry's to be done in approximately | |
5 oldest first order.</p> | |
6 | |
7 <p>FIFO ordering is, essentially, cache defeating in that it | |
8 demands loading the <em>least</em> recently used Entry's rather than | |
9 favouring <em>most recently</em> used Entry's. Therefore, enabling | |
10 FIFO will reduce overall performance of Blitz which may be countered | |
11 by assumptions you can make in your JavaSpaces code</p> | |
12 | |
13 <p>Note that FIFO is <em>not</em> a requirement of the JavaSpaces spec and | |
14 you cannot assume all JavaSpaces implementations provide FIFO support. | |
15 Thus, by using the Blitz FIFO facility, you are potentially locking | |
16 yourself in.</p> | |
17 | |
18 <p>Note that the number of pending dirty writes can significantly affect | |
19 FIFO performance. Normally, one configures Blitz with a large pending | |
20 writes buffer to reduce IO and increase performance. When FIFO is enabled, | |
21 large write buffers introduce significant amounts of additional processing | |
22 thus you are advised to reduce the size of <code>desiredPendingWrites</code> | |
23 to of the order of <code>100</code>.</p> | |
24 */ | |
25 public class Fifo implements EntryConstraint { | |
26 private static final String TYPE = "FIFO"; | |
27 | |
28 public Fifo() { | |
29 } | |
30 | |
31 public int hashCode() { | |
32 return TYPE.hashCode(); | |
33 } | |
34 | |
35 public boolean equals(Object anObject) { | |
36 return (anObject instanceof Fifo); | |
37 } | |
38 } |