com.atomikos.persistence
Interface ObjectLog

All Known Implementing Classes:
StreamObjectLog

public interface ObjectLog

Interface defining the functionality for logging objects to persistent storage.


Method Summary
 void close()
          Closes the log after use.
 void delete(Object id)
          Deletes the given object from the log.
 void flush(Recoverable recoverable)
          Flushes to permanent memory.
 void init()
          Initializes the object log.
 Vector recover()
          Recovers all non-deleted object images flushed so far.
 Recoverable recover(Object id)
          Recovers the instance with given ID.
 

Method Detail

flush

void flush(Recoverable recoverable)
           throws LogException
Flushes to permanent memory.

Parameters:
recoverable - Recoverable instance. NOTE: if the instance has the same ObjectId as a previous one, then the latter will be overridden by this one! More precisely, history() will only return the last image for a given ObjectId.
Throws:
LogException - if it did not work.

init

void init()
          throws LogException
Initializes the object log. To be called as the first method.

Throws:
LogException - If error occurs.

recover

Vector recover()
               throws LogException
Recovers all non-deleted object images flushed so far.

Returns:
Vector A list of Recoverable instances, reconstructed from their images.
Throws:
LogException

recover

Recoverable recover(Object id)
                    throws LogException
Recovers the instance with given ID.

Parameters:
id - The id to recover. @return Recoverable The recovered logimage, null if not found. @exception LogException On failure.
Throws:
LogException

delete

void delete(Object id)
            throws LogException
Deletes the given object from the log.

Parameters:
id - The object UID.
Throws:
LogException - on failure.

close

void close()
           throws LogException
Closes the log after use.

Throws:
LogException - on failure.


Copyright © 2012. All Rights Reserved.