Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.io.util
Class Memory

    java.lang.Object
      org.apache.cassandra.io.util.Memory

Direct Known Subclasses:
  FreeableMemory

    public class Memory

extends java.lang.Object

Field Summary
`protected long` | `peer`

Constructor Summary
`protected` | `Memory(long bytes)`

Method Summary
`static Memory` | `allocate(long bytes)`
`void` | `free()`
`byte` | `getByte(long offset)`
`void` | `getBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)` Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
`void` | `setByte(long offset, byte b)`
`void` | `setBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)` Transfers count bytes from buffer to Memory
`long` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### peer

    protected long peer

Constructor Detail

### Memory

    protected Memory(long bytes)

Method Detail

### allocate

    public static Memory allocate(long bytes)

### setByte

    public void setByte(long offset,
                        byte b)

### setBytes

    public void setBytes(long memoryOffset,
                         byte[] buffer,
                         int bufferOffset,
                         int count)

  Transfers count bytes from buffer to Memory

  Parameters:
    `memoryOffset` - start offset in the memory
    `buffer` - the data buffer
    `bufferOffset` - start offset of the buffer
    `count` - number of bytes to transfer

### getByte

    public byte getByte(long offset)

### getBytes

    public void getBytes(long memoryOffset,
                         byte[] buffer,
                         int bufferOffset,
                         int count)

  Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset

  Parameters:
    `memoryOffset` - start offset in the memory
    `buffer` - the data buffer
    `bufferOffset` - start offset of the buffer
    `count` - number of bytes to transfer

### free

    public void free()

### size

    public long size()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation