Search in sources :

Example 1 with LocalTimestampInvariantsVerifier

use of com.palantir.timelock.corruption.detection.LocalTimestampInvariantsVerifier in project atlasdb by palantir.

the class PaxosResourcesFactory method timeLockCorruptionComponents.

private static TimeLockCorruptionComponents timeLockCorruptionComponents(DataSource dataSource, PaxosRemoteClients remoteClients) {
    RemoteCorruptionDetector remoteCorruptionDetector = new RemoteCorruptionDetector();
    PaxosLogHistoryProvider historyProvider = new PaxosLogHistoryProvider(dataSource, remoteClients.getRemoteHistoryProviders());
    LocalTimestampInvariantsVerifier timestampInvariantsVerifier = new LocalTimestampInvariantsVerifier(dataSource);
    LocalCorruptionDetector localCorruptionDetector = LocalCorruptionDetector.create(historyProvider, remoteClients.getRemoteCorruptionNotifiers(), timestampInvariantsVerifier);
    CorruptionHealthCheck healthCheck = new CorruptionHealthCheck(localCorruptionDetector, remoteCorruptionDetector);
    LocalHistoryLoader localHistoryLoader = LocalHistoryLoader.create(SqlitePaxosStateLogHistory.create(dataSource));
    return TimeLockCorruptionComponents.builder().timeLockCorruptionHealthCheck(healthCheck).remoteCorruptionDetector(remoteCorruptionDetector).localHistoryLoader(localHistoryLoader).build();
}
Also used : PaxosLogHistoryProvider(com.palantir.timelock.history.PaxosLogHistoryProvider) RemoteCorruptionDetector(com.palantir.timelock.corruption.detection.RemoteCorruptionDetector) LocalHistoryLoader(com.palantir.timelock.history.LocalHistoryLoader) LocalTimestampInvariantsVerifier(com.palantir.timelock.corruption.detection.LocalTimestampInvariantsVerifier) CorruptionHealthCheck(com.palantir.timelock.corruption.detection.CorruptionHealthCheck) LocalCorruptionDetector(com.palantir.timelock.corruption.detection.LocalCorruptionDetector)

Aggregations

CorruptionHealthCheck (com.palantir.timelock.corruption.detection.CorruptionHealthCheck)1 LocalCorruptionDetector (com.palantir.timelock.corruption.detection.LocalCorruptionDetector)1 LocalTimestampInvariantsVerifier (com.palantir.timelock.corruption.detection.LocalTimestampInvariantsVerifier)1 RemoteCorruptionDetector (com.palantir.timelock.corruption.detection.RemoteCorruptionDetector)1 LocalHistoryLoader (com.palantir.timelock.history.LocalHistoryLoader)1 PaxosLogHistoryProvider (com.palantir.timelock.history.PaxosLogHistoryProvider)1