예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: static void readKeyValuePair(org.neo4j.io.pagecache.PageCursor cursor, int offset, WritableBuffer key, WritableBuffer value) throws java.io.IOException
        internal static void ReadKeyValuePair(PageCursor cursor, int offset, WritableBuffer key, WritableBuffer value)
        {
            long retriesLeft = MAX_LOOKUP_RETRY_COUNT;

            do
            {
                cursor.Offset = offset;
                key.GetFrom(cursor);
                value.GetFrom(cursor);
            } while (cursor.ShouldRetry() && (--retriesLeft) > 0);

            if (cursor.CheckAndClearBoundsFlag())
            {
                ThrowOutOfBounds(cursor, offset);
            }

            if (retriesLeft == 0)
            {
                ThrowFailedRead(cursor, offset);
            }
        }