예제 #1
0
        /// <summary>
        /// Partial Get buffer
        /// </summary>
        /// <param name="keySpace">type id</param>
        /// <param name="key">key</param>
        /// <param name="offset">start offset</param>
        /// <param name="length">copy length</param>
        /// <returns>bytes buffer</returns>
        public byte[] GetBuffer(DataBuffer keySpace, StorageKey key, int offset, int length)
        {
            byte[] returnBuffer = this.store.GetEntryBuffer((short)keySpace.Int32Value, key.PartitionId, key.Key, GetOptions.Partial(offset, length));

            int bufferLength = returnBuffer == null ? 0 : returnBuffer.Length;

            IncrementGetPerfCounter(bufferLength);

            return(returnBuffer);
        }
예제 #2
0
        /// <summary>
        /// Partial get with an offset
        /// </summary>
        /// <param name="keySpace">type id</param>
        /// <param name="key">key</param>
        /// <param name="offset">offset</param>
        /// <param name="output">output buffer</param>
        /// <returns>bytes get</returns>
        public int Get(DataBuffer keySpace, StorageKey key, int offset, DataBuffer output)
        {
            int getBytes = this.store.GetEntry((short)keySpace.Int32Value, key.PartitionId, key.Key, output, GetOptions.Partial(offset));

            IncrementGetPerfCounter(getBytes);

            return(getBytes);
        }