com.atomikos.recovery.imp
Class CachedRepository

java.lang.Object
  extended by com.atomikos.recovery.imp.CachedRepository
All Implemented Interfaces:
Repository

public class CachedRepository
extends Object
implements Repository


Constructor Summary
CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository, Repository backupCoordinatorLogEntryRepository)
           
 
Method Summary
protected  void assertNotCorrupted()
           
protected  boolean canBeForgotten(long now, CoordinatorLogEntry coordinatorLogEntry)
           
 void close()
           
 Collection<CoordinatorLogEntry> findAllCommittingCoordinatorLogEntries()
           
 CoordinatorLogEntry get(String coordinatorId)
           
 Collection<CoordinatorLogEntry> getAllCoordinatorLogEntries()
           
 void init()
           
 void put(String id, CoordinatorLogEntry coordinatorLogEntry)
           
 void writeCheckpoint(Collection<CoordinatorLogEntry> checkpointContent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedRepository

public CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository,
                        Repository backupCoordinatorLogEntryRepository)
Method Detail

init

public void init()
Specified by:
init in interface Repository

put

public void put(String id,
                CoordinatorLogEntry coordinatorLogEntry)
         throws IllegalArgumentException,
                LogWriteException
Specified by:
put in interface Repository
Throws:
IllegalArgumentException
LogWriteException

canBeForgotten

protected boolean canBeForgotten(long now,
                                 CoordinatorLogEntry coordinatorLogEntry)

get

public CoordinatorLogEntry get(String coordinatorId)
                        throws LogReadException
Specified by:
get in interface Repository
Throws:
LogReadException

assertNotCorrupted

protected void assertNotCorrupted()
                           throws LogReadException
Throws:
LogReadException

findAllCommittingCoordinatorLogEntries

public Collection<CoordinatorLogEntry> findAllCommittingCoordinatorLogEntries()
                                                                       throws LogReadException
Specified by:
findAllCommittingCoordinatorLogEntries in interface Repository
Throws:
LogReadException

close

public void close()
Specified by:
close in interface Repository

getAllCoordinatorLogEntries

public Collection<CoordinatorLogEntry> getAllCoordinatorLogEntries()
Specified by:
getAllCoordinatorLogEntries in interface Repository

writeCheckpoint

public void writeCheckpoint(Collection<CoordinatorLogEntry> checkpointContent)
Specified by:
writeCheckpoint in interface Repository


Copyright © 2016. All Rights Reserved.