org.siebengeisslein.core
Class DataStoreImpl

java.lang.Object
  extended by org.siebengeisslein.core.DataStoreImpl
All Implemented Interfaces:
DataStore

public class DataStoreImpl
extends java.lang.Object
implements DataStore


Field Summary
static java.lang.String EXT
           
 
Constructor Summary
DataStoreImpl(Config config, boolean create)
           
 
Method Summary
 long addEntry(CoreEntry entry)
           
 void close()
           
 void commit()
           
 void endCompress()
           
 CoreEntry getEntry(long position)
           
 long moveEntry(long pos)
          Move the entry at "position" to the currently active datastore file.
 void recovered()
           
 long size()
           
 void startCompress()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT

public static final java.lang.String EXT
See Also:
Constant Field Values
Constructor Detail

DataStoreImpl

public DataStoreImpl(Config config,
                     boolean create)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

size

public long size()
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

recovered

public void recovered()
               throws java.io.IOException
Throws:
java.io.IOException

getEntry

public CoreEntry getEntry(long position)
                   throws java.io.IOException
Throws:
java.io.IOException

addEntry

public long addEntry(CoreEntry entry)
              throws java.io.IOException
Throws:
java.io.IOException

startCompress

public void startCompress()
                   throws java.io.IOException
Throws:
java.io.IOException

endCompress

public void endCompress()
                 throws java.io.IOException
Throws:
java.io.IOException

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

moveEntry

public long moveEntry(long pos)
               throws java.io.IOException
Description copied from interface: DataStore
Move the entry at "position" to the currently active datastore file. This is used for datastore compression.

Specified by:
moveEntry in interface DataStore
Throws:
java.io.IOException