Search in sources :

Example 1 with DetachedCheckpointLogEntryWriter

use of org.neo4j.kernel.impl.transaction.log.entry.DetachedCheckpointLogEntryWriter in project neo4j by neo4j.

the class DetachedCheckpointAppender method start.

@Override
public void start() throws IOException {
    this.storeId = context.getStoreId();
    logVersionRepository = requireNonNull(context.getLogVersionRepository());
    long initialVersion = logVersionRepository.getCheckpointLogVersion();
    channel = channelAllocator.createLogChannel(initialVersion, context::getLastCommittedTransactionId);
    context.getMonitors().newMonitor(LogRotationMonitor.class).started(channel.getPath(), initialVersion);
    channel.position(channel.size());
    buffer = new NativeScopedBuffer(kibiBytes(1), context.getMemoryTracker());
    writer = new PositionAwarePhysicalFlushableChecksumChannel(channel, buffer);
    checkpointWriter = new DetachedCheckpointLogEntryWriter(writer);
}
Also used : LogRotationMonitor(org.neo4j.kernel.impl.transaction.log.rotation.monitor.LogRotationMonitor) PositionAwarePhysicalFlushableChecksumChannel(org.neo4j.kernel.impl.transaction.log.PositionAwarePhysicalFlushableChecksumChannel) NativeScopedBuffer(org.neo4j.io.memory.NativeScopedBuffer) DetachedCheckpointLogEntryWriter(org.neo4j.kernel.impl.transaction.log.entry.DetachedCheckpointLogEntryWriter)

Aggregations

NativeScopedBuffer (org.neo4j.io.memory.NativeScopedBuffer)1 PositionAwarePhysicalFlushableChecksumChannel (org.neo4j.kernel.impl.transaction.log.PositionAwarePhysicalFlushableChecksumChannel)1 DetachedCheckpointLogEntryWriter (org.neo4j.kernel.impl.transaction.log.entry.DetachedCheckpointLogEntryWriter)1 LogRotationMonitor (org.neo4j.kernel.impl.transaction.log.rotation.monitor.LogRotationMonitor)1