|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unister.semweb.drums.GlobalParameters<Data>
Data
- an implementation of AbstractKVStorable
, e.g. GeneralStorable
public class GlobalParameters<Data extends AbstractKVStorable>
This class represents all parameters, which are used globally in a DRUMS-Instance. The instance of
GlobalParameters
should be available in all internal Objects used by DRUMS
.
Field Summary | |
---|---|
long |
BUCKET_MEMORY
The amount of bytes all buckets are allowed to use. |
java.lang.String |
databaseDirectory
The database directory. |
int |
elementSize
The number bytes needed by an instance of AbstractKVStorable . |
long |
FILE_CHUNK_SIZE
The size of one chunk in an HeaderIndexFile |
int |
HEADER_FILE_LOCK_RETRY
the number of retries if a file is locked by another process |
int |
ID
a identification number of this parameter set. |
int |
INITIAL_FILE_SIZE
the initial size of a HeaderIndexFile . |
int |
INITIAL_INCREMENT_SIZE
the initial size by which the file is enlarged, when no more records will fit into the file. |
static java.util.concurrent.atomic.AtomicInteger |
INSTANCE_COUNT
A global count of all instances of GlobalParameters . |
int |
keySize
The size of the key of the implementation of AbstractKVStorable . |
java.lang.String |
linkDataFileExtension
File extension of the database files that store the AbstractKVStorable . |
long |
MAX_BUCKET_STORAGE_TIME
The maximal time in milliseconds a bucket is held in memory without synchronization attempt. |
long |
MAX_MEMORY_PER_BUCKET
The maximal size of a bucket in bytes. |
int |
MEMORY_CHUNK
the size of one chunk in memory |
int |
MIN_ELEMENT_IN_BUCKET_BEFORE_SYNC
The minimal number of elements which must be in one bucket, before this bucket is allowed to be synchronized. |
int |
NUMBER_OF_SYNCHRONIZER_THREADS
The number of threads used for synchronizing. |
java.lang.String |
PARAMETER_FILE
The name of the underlying parameter file. |
long |
SYNC_CHUNK_SIZE
The number of bytes, which are read and written at once during synchronization |
Constructor Summary | |
---|---|
GlobalParameters(Data prototype)
The standard constructor. |
|
GlobalParameters(java.lang.String paramFile,
Data prototype)
Initialize global parameters by those from the given parameter-file. |
Method Summary | |
---|---|
void |
configToLogInfo()
Outputs the configuration to the Logger. |
Data |
getPrototype()
Returns a clone of the prototype. |
void |
initParameters()
Initialises all Parameters. |
static long |
parseSize(java.lang.String s)
This methods parses the given String, which should represent a size, to a long. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.concurrent.atomic.AtomicInteger INSTANCE_COUNT
GlobalParameters
. This variable is needed if more than one DRUMS will
run in one JVM.
public java.lang.String databaseDirectory
public java.lang.String PARAMETER_FILE
public final int ID
public long BUCKET_MEMORY
public long MAX_MEMORY_PER_BUCKET
public int MEMORY_CHUNK
public int HEADER_FILE_LOCK_RETRY
public long SYNC_CHUNK_SIZE
public long FILE_CHUNK_SIZE
HeaderIndexFile
public int NUMBER_OF_SYNCHRONIZER_THREADS
public int MIN_ELEMENT_IN_BUCKET_BEFORE_SYNC
public java.lang.String linkDataFileExtension
AbstractKVStorable
.
public int INITIAL_INCREMENT_SIZE
public int INITIAL_FILE_SIZE
HeaderIndexFile
.
public final int keySize
AbstractKVStorable
.
public final int elementSize
AbstractKVStorable
.
public long MAX_BUCKET_STORAGE_TIME
Constructor Detail |
---|
public GlobalParameters(java.lang.String paramFile, Data prototype)
paramFile
- The name of the parameter-fileprototype
- a prototype of the Data of this DRUMSpublic GlobalParameters(Data prototype)
prototype
- a prototype of the Data of this DRUMSMethod Detail |
---|
public Data getPrototype()
public void initParameters()
public void configToLogInfo()
public static long parseSize(java.lang.String s)
s
- the String to parse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |