Search in sources :

Example 6 with DummyRaftableContentSerializer

use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.

the class SegmentedRaftLogRotationTruncationPruneTest method createRaftLog.

private RaftLog createRaftLog() throws Exception {
    File directory = new File(RAFT_LOG_DIRECTORY_NAME);
    FileSystemAbstraction fileSystem = new EphemeralFileSystemAbstraction();
    fileSystem.mkdir(directory);
    LogProvider logProvider = getInstance();
    CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory("1 entries", logProvider).newInstance();
    SegmentedRaftLog newRaftLog = new SegmentedRaftLog(fileSystem, directory, 1, new DummyRaftableContentSerializer(), logProvider, 8, Clocks.fakeClock(), new OnDemandJobScheduler(), pruningStrategy);
    newRaftLog.start();
    return newRaftLog;
}
Also used : LogProvider(org.neo4j.logging.LogProvider) EphemeralFileSystemAbstraction(org.neo4j.graphdb.mockfs.EphemeralFileSystemAbstraction) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) EphemeralFileSystemAbstraction(org.neo4j.graphdb.mockfs.EphemeralFileSystemAbstraction) OnDemandJobScheduler(org.neo4j.test.OnDemandJobScheduler) File(java.io.File) DummyRaftableContentSerializer(org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer)

Aggregations

DummyRaftableContentSerializer (org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer)6 LogProvider (org.neo4j.logging.LogProvider)6 OnDemandJobScheduler (org.neo4j.test.OnDemandJobScheduler)6 File (java.io.File)4 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)3 EphemeralFileSystemAbstraction (org.neo4j.graphdb.mockfs.EphemeralFileSystemAbstraction)2