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();
}
Aggregations