comparison src/org/dancres/blitz/config/ReadAhead.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>When Blitz encounters a template Entry created via snapshot() it will
5 * attempt a readahead from disk when there are no matches obtained from the
6 * cache. One can specify a global default readahead for all types using <code>
7 * entryReposReadahead</code> which can be overidden with individual
8 * <code>ReadAhead</code> <code>EntryConstraint</code>s.</p>
9 *
10 * <p>Specifying a readahead size of 0 disables readahead and is an enforced
11 * default for those Entry types tagged for FIFO operation. Specifying any
12 * other positive value causes Blitz to fault in up to <code>readahead</code>
13 * Entry's from disk which are likely to match the <code>snapshot</code>'d
14 * template.</p>
15 *
16 * <p>Readahead is useful in cold start situations where the cache will be
17 * empty and also in cases where swapping occurs but Entry's are accessed in
18 * groups via a snapshot template.</p>
19 */
20 public class ReadAhead implements EntryConstraint {
21 private int theSize;
22
23 public ReadAhead(int aSize) {
24 theSize = aSize;
25 }
26
27 public int getSize() {
28 return theSize;
29 }
30 }