View Javadoc

1   package net.obsearch.storage;
2   
3   public class OBStorageConfig {
4   	/**
5   	 * Index that will be used by the underlying storage device
6   	 *
7   	 */
8   	public enum IndexType {
9   		HASH, BTREE, 
10  		FIXED_RECORD,
11  		DEFAULT
12  	}
13  	
14  	private boolean temp = false;
15  	private boolean duplicates = false; 
16  	private boolean bulkMode = false;
17  	private boolean fixedSizeIndex = false;
18  	
19  	private IndexType type = IndexType.DEFAULT;
20  	
21  	public boolean isFixedSizeIndex() {
22  		return type == IndexType.FIXED_RECORD;
23  	}
24  
25  	/**
26  	 * Size of the records that will be stored
27  	 * Some storage devices require this information or
28  	 * will behave differently if this information
29  	 * is given.
30  	 * 
31  	 */
32  	private int recordSize = -1;
33  	
34  	public IndexType getIndexType(){
35  		return type;
36  	}
37  	
38  	public void setIndexType(IndexType newType){
39  		this.type = newType;
40  	}
41  	
42  	public boolean isTemp() {
43  		return temp;
44  	}
45  	public void setTemp(boolean temp) {
46  		this.temp = temp;
47  	}
48  	public boolean isDuplicates() {
49  		return duplicates;
50  	}
51  	public void setDuplicates(boolean duplicates) {
52  		this.duplicates = duplicates;
53  	}
54  	public boolean isBulkMode() {
55  		return bulkMode;
56  	}
57  	public void setBulkMode(boolean bulkMode) {
58  		this.bulkMode = bulkMode;
59  	}
60  	public int getRecordSize() {
61  		return recordSize;
62  	}
63  	public void setRecordSize(int recordSize) {
64  		this.recordSize = recordSize;
65  	}
66  	
67  	
68  }