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.cache
Class FreeableMemory

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

    public class FreeableMemory

extends Memory

Field Summary

Fields inherited from class org.apache.cassandra.io.util.Memory
`peer`

Constructor Summary
`FreeableMemory(long size)`

Method Summary
`byte` | `getByte(long offset)`
`boolean` | `reference()`
`void` | `unreference()` decrement reference count.

Methods inherited from class org.apache.cassandra.io.util.Memory
`allocate, free, getBytes, setByte, setBytes, size`

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

Constructor Detail

### FreeableMemory

    public FreeableMemory(long size)

Method Detail

### reference

    public boolean reference()

  Returns:
    true if we succeed in referencing before the reference count reaches zero. (A FreeableMemory object is created with a reference count of one.)

### unreference

    public void unreference()

  decrement reference count. if count reaches zero, the object is freed.

### getByte

    public byte getByte(long offset)

  Overrides:
    `getByte` in class `Memory`

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