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