Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.persistence.imp
Class FileLogStream

    java.lang.Object
      com.atomikos.persistence.imp.FileLogStream

All Implemented Interfaces:
  LogStream

    public class FileLogStream

extends Object
implements LogStream

A file implementation of a LogStream.

Constructor Summary
`FileLogStream(String baseDir, String baseName)`

Method Summary
`void` | `close()` For proper termination: a close method.
`void` | `finalize()`
`void` | `flushObject(Object o, boolean shouldSync)` Flush (force) an object to the stream.
`long` | `getSize()` Get the size of the stream.
`Vector` | `recover()` Reads the log contents, and initializes the data structure.
`void` | `writeCheckpoint(Enumeration elements)` After intial recovery, it is good practice to write a checkpoint with only the most recent data.

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileLogStream

    public FileLogStream(String baseDir,
                         String baseName)
                  throws IOException

Throws:
  `IOException`

Method Detail

### recover

    public Vector recover()
                   throws LogException

  Description copied from interface: `LogStream`
  Reads the log contents, and initializes the data structure. Should be called first.

  Specified by:
    `recover` in interface `LogStream`
  Returns:
    Vector The read objects from the log.
  Throws:
    `LogException` - On failure.

### writeCheckpoint

    public void writeCheckpoint(Enumeration elements)
                         throws LogException

  Description copied from interface: `LogStream`
  After intial recovery, it is good practice to write a checkpoint with only the most recent data. This method does that, and can also be called at random intervals during normal operation.

  Specified by:
    `writeCheckpoint` in interface `LogStream`
  Parameters:
    `elements` - The elements to keep in the log.
  Throws:
    `LogException` - On failure.

### flushObject

    public void flushObject(Object o,
                            boolean shouldSync)
                     throws LogException

  Description copied from interface: `LogStream`
  Flush (force) an object to the stream. If this method returns then the object is guaranteed to be persisted.

  Specified by:
    `flushObject` in interface `LogStream`
  Throws:
    `LogException` - On failure.

### close

    public void close()
               throws LogException

  Description copied from interface: `LogStream`
  For proper termination: a close method.

  Specified by:
    `close` in interface `LogStream`
  Throws:
    `LogException` - On failure.

### finalize

    public void finalize()
                  throws Throwable

  Overrides:
    `finalize` in class `Object`
  Throws:
    `Throwable`

### getSize

    public long getSize()
                 throws LogException

  Description copied from interface: `LogStream`
  Get the size of the stream.

  Specified by:
    `getSize` in interface `LogStream`
  Returns:
    long The size of the stream.
  Throws:
    `LogException` - On error.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.