public class CachedRepository extends 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,
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) |
public CachedRepository(InMemoryRepository inMemoryCoordinatorLogEntryRepository, Repository backupCoordinatorLogEntryRepository)
public void init()
init in interface Repositorypublic void put(String id, CoordinatorLogEntry coordinatorLogEntry) throws IllegalArgumentException, LogWriteException
put in interface RepositoryIllegalArgumentExceptionLogWriteExceptionprotected boolean canBeForgotten(long now,
CoordinatorLogEntry coordinatorLogEntry)
public CoordinatorLogEntry get(String coordinatorId) throws LogReadException
get in interface RepositoryLogReadExceptionprotected void assertNotCorrupted()
throws LogReadException
LogReadExceptionpublic Collection<CoordinatorLogEntry> findAllCommittingCoordinatorLogEntries() throws LogReadException
findAllCommittingCoordinatorLogEntries in interface RepositoryLogReadExceptionpublic void close()
close in interface Repositorypublic Collection<CoordinatorLogEntry> getAllCoordinatorLogEntries()
getAllCoordinatorLogEntries in interface Repositorypublic void writeCheckpoint(Collection<CoordinatorLogEntry> checkpointContent)
writeCheckpoint in interface RepositoryCopyright © 2016. All Rights Reserved.