org.sakaiproject.search.journal.api
Interface JournaledObject

All Known Subinterfaces:
JournaledIndex
All Known Implementing Classes:
JournaledFSIndexStorage

public interface JournaledObject

A journal object is an object that is managed by a jornal redo log

Author:
ieb

Method Summary
 boolean aquireReadLock()
          Aquires a lock to read the object
 boolean aquireUpdateLock()
          get a lock on on the object for update
 void debugLock()
           
 long getJournalSavePoint()
          Get the current Journaled SavePoint
 long getLastJournalEntry()
          get the last journal entry we tried to migrate to
 void releaseReadLock()
          releases a lock to read object
 void releaseUpdateLock()
          release the update lock
 void setJournalIndexEntry(long journalEntry)
          Set the current index entry for the journal
 void setLastJournalEntry(long nextJournalEntry)
          Set the last journal entry we tried to migrate to
 

Method Detail

getJournalSavePoint

long getJournalSavePoint()
Get the current Journaled SavePoint

Returns:

aquireUpdateLock

boolean aquireUpdateLock()
get a lock on on the object for update

Returns:
true is lock was granted, false if not

releaseUpdateLock

void releaseUpdateLock()
release the update lock


aquireReadLock

boolean aquireReadLock()
Aquires a lock to read the object

Returns:
true if lock was granted, false if not

releaseReadLock

void releaseReadLock()
releases a lock to read object


getLastJournalEntry

long getLastJournalEntry()
get the last journal entry we tried to migrate to

Returns:

setLastJournalEntry

void setLastJournalEntry(long nextJournalEntry)
Set the last journal entry we tried to migrate to

Parameters:
nextJournalEntry -

setJournalIndexEntry

void setJournalIndexEntry(long journalEntry)
Set the current index entry for the journal

Parameters:
journalEntry -

debugLock

void debugLock()


Copyright © 2003-2012 Sakai Project. All Rights Reserved.