Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: There is no .NET equivalent to the Java 'super' constraint:
//ORIGINAL LINE: static <Buffer extends BigEndianByteArrayBuffer> void scanAll(org.neo4j.io.pagecache.PagedFile file, int startOffset, EntryVisitor<? super Buffer> visitor, Buffer key, Buffer value) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal static void ScanAll <Buffer, T1>(PagedFile file, int startOffset, EntryVisitor <T1> visitor, Buffer key, Buffer value) where Buffer : BigEndianByteArrayBuffer
        {
            bool visitHeaders = !(visitor is KeyValueVisitor);

            using (PageCursor cursor = file.Io(startOffset / file.PageSize(), PF_SHARED_READ_LOCK))
            {
                if (!cursor.Next())
                {
                    return;
                }
                ReadKeyValuePair(cursor, startOffset, key, value);
                VisitKeyValuePairs(file.PageSize(), cursor, startOffset, visitor, visitHeaders, key, value);
            }
        }
Пример #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: PageCacheNumberArray(org.neo4j.io.pagecache.PagedFile pagedFile, int entrySize, long length, long defaultValue, long super) throws java.io.IOException
        internal PageCacheNumberArray(PagedFile pagedFile, int entrySize, long length, long defaultValue, long @base)
        {
            this.PagedFile      = pagedFile;
            this.EntrySize      = entrySize;
            this.EntriesPerPage = pagedFile.PageSize() / entrySize;
            this._length        = length;
            this._defaultValue  = defaultValue;
            this.@base          = @base;

            using (PageCursor cursorToSetLength = pagedFile.Io(0, PF_SHARED_WRITE_LOCK))
            {
                SetLength(cursorToSetLength, length);
            }

            if (defaultValue != 0)
            {
                DefaultValue = defaultValue;
            }
        }
Пример #3
0
 public override int PageSize()
 {
     return(@delegate.PageSize());
 }