Exemplo n.º 1
0
 internal TransactionLogFile(TransactionLogFiles logFiles, TransactionLogFilesContext context)
 {
     this._rotateAtSize           = context.RotationThreshold;
     this._context                = context;
     this._logFiles               = logFiles;
     this._readerLogVersionBridge = new ReaderLogVersionBridge(logFiles);
 }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.kernel.impl.transaction.log.ReadableLogChannel getReader(org.neo4j.kernel.impl.transaction.log.LogPosition position, org.neo4j.kernel.impl.transaction.log.LogVersionBridge logVersionBridge) throws java.io.IOException
        public override ReadableLogChannel GetReader(LogPosition position, LogVersionBridge logVersionBridge)
        {
            PhysicalLogVersionedStoreChannel logChannel = _logFiles.openForVersion(position.LogVersion);

            logChannel.Position(position.ByteOffset);
            return(new ReadAheadLogChannel(logChannel, logVersionBridge));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private int transactionCount() throws java.io.IOException
        private int TransactionCount()
        {
            return(AggregateLogData(version =>
            {
                int counter = 0;
                LogVersionBridge bridge = channel => channel;
                LogVersionedStoreChannel versionedStoreChannel = _files.openForVersion(version);
                using (ReadableLogChannel channel = new ReadAheadLogChannel(versionedStoreChannel, bridge, 1000))
                {
                    using (PhysicalTransactionCursor <ReadableLogChannel> physicalTransactionCursor = new PhysicalTransactionCursor <ReadableLogChannel>(channel, new VersionAwareLogEntryReader <>()))
                    {
                        while (physicalTransactionCursor.Next())
                        {
                            counter++;
                        }
                    }
                }
                return counter;
            }));
        }
Exemplo n.º 4
0
 public ReadAheadLogChannel(LogVersionedStoreChannel startingChannel, LogVersionBridge bridge, int readAheadSize) : base(startingChannel, readAheadSize)
 {
     this._bridge = bridge;
 }
Exemplo n.º 5
0
 public ReadAheadLogChannel(LogVersionedStoreChannel startingChannel, LogVersionBridge bridge) : this(startingChannel, bridge, DefaultReadAheadSize)
 {
 }