public class CachedRepository extends Object implements Repository
| Constructor and Description |
|---|
CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository,
Repository backupCoordinatorLogEntryRepository) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canBeForgotten(long now,
PendingTransactionRecord coordinatorLogEntry) |
void |
close() |
Collection<PendingTransactionRecord> |
findAllCommittingCoordinatorLogEntries() |
PendingTransactionRecord |
get(String coordinatorId) |
Collection<PendingTransactionRecord> |
getAllCoordinatorLogEntries() |
void |
init() |
void |
put(String id,
PendingTransactionRecord coordinatorLogEntry) |
void |
writeCheckpoint(Collection<PendingTransactionRecord> checkpointContent) |
public CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository, Repository backupCoordinatorLogEntryRepository)
public void init()
init in interface Repositorypublic void put(String id, PendingTransactionRecord coordinatorLogEntry) throws IllegalArgumentException, LogWriteException
put in interface RepositoryIllegalArgumentExceptionLogWriteExceptionprotected boolean canBeForgotten(long now,
PendingTransactionRecord coordinatorLogEntry)
public PendingTransactionRecord get(String coordinatorId) throws LogReadException
get in interface RepositoryLogReadExceptionpublic Collection<PendingTransactionRecord> findAllCommittingCoordinatorLogEntries() throws LogReadException
findAllCommittingCoordinatorLogEntries in interface RepositoryLogReadExceptionpublic void close()
close in interface Repositorypublic Collection<PendingTransactionRecord> getAllCoordinatorLogEntries()
getAllCoordinatorLogEntries in interface Repositorypublic void writeCheckpoint(Collection<PendingTransactionRecord> checkpointContent)
writeCheckpoint in interface RepositoryCopyright © 2023. All rights reserved.