public class CachedRepository extends java.lang.Object implements Repository
Constructor and Description |
---|
CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository,
Repository backupCoordinatorLogEntryRepository) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertNotCorrupted() |
protected boolean |
canBeForgotten(long now,
PendingTransactionRecord coordinatorLogEntry) |
void |
close() |
java.util.Collection<PendingTransactionRecord> |
findAllCommittingCoordinatorLogEntries() |
PendingTransactionRecord |
get(java.lang.String coordinatorId) |
java.util.Collection<PendingTransactionRecord> |
getAllCoordinatorLogEntries() |
void |
init() |
void |
put(java.lang.String id,
PendingTransactionRecord coordinatorLogEntry) |
void |
writeCheckpoint(java.util.Collection<PendingTransactionRecord> checkpointContent) |
public CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository, Repository backupCoordinatorLogEntryRepository)
public void init()
init
in interface Repository
public void put(java.lang.String id, PendingTransactionRecord coordinatorLogEntry) throws java.lang.IllegalArgumentException, LogWriteException
put
in interface Repository
java.lang.IllegalArgumentException
LogWriteException
protected boolean canBeForgotten(long now, PendingTransactionRecord coordinatorLogEntry)
public PendingTransactionRecord get(java.lang.String coordinatorId) throws LogReadException
get
in interface Repository
LogReadException
protected void assertNotCorrupted() throws LogReadException
LogReadException
public java.util.Collection<PendingTransactionRecord> findAllCommittingCoordinatorLogEntries() throws LogReadException
findAllCommittingCoordinatorLogEntries
in interface Repository
LogReadException
public void close()
close
in interface Repository
public java.util.Collection<PendingTransactionRecord> getAllCoordinatorLogEntries()
getAllCoordinatorLogEntries
in interface Repository
public void writeCheckpoint(java.util.Collection<PendingTransactionRecord> checkpointContent)
writeCheckpoint
in interface Repository
Copyright © 2020. All Rights Reserved.