org.apache.cassandra.db.composites

## Class SimpleComposite

- java.lang.Object
- - org.apache.cassandra.db.composites.AbstractComposite
  - - org.apache.cassandra.db.composites.SimpleComposite

All Implemented Interfaces:
  IMeasurableMemory, Composite

Direct Known Subclasses:
  SimpleDenseCellName

    public class SimpleComposite
    extends AbstractComposite

A "simple" (not-truly-composite) Composite.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.Composite

`Composite.EOC`

### Field Summary

Fields
`protected java.nio.ByteBuffer` `element`

### Method Summary

All Methods Instance Methods Concrete Methods
`Composite` `copy(CFMetaData cfm, AbstractAllocator allocator)`
`java.nio.ByteBuffer` `get(int i)`
`int` `size()`
`java.nio.ByteBuffer` `toByteBuffer()`
`long` `unsharedHeapSize()`
`Composite` `withEOC(Composite.EOC newEoc)`

### Methods inherited from class org.apache.cassandra.db.composites.AbstractComposite

`dataSize, end, eoc, equals, hashCode, isEmpty, isPrefixOf, isStatic, slice, start`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### element

    protected final java.nio.ByteBuffer element

### Method Detail

#### size

    public int size()

#### get

    public java.nio.ByteBuffer get(int i)

#### withEOC

    public Composite withEOC(Composite.EOC newEoc)

Specified by:
  `withEOC` in interface `Composite`
Overrides:
  `withEOC` in class `AbstractComposite`

#### toByteBuffer

    public java.nio.ByteBuffer toByteBuffer()

Specified by:
  `toByteBuffer` in interface `Composite`
Overrides:
  `toByteBuffer` in class `AbstractComposite`

#### unsharedHeapSize

    public long unsharedHeapSize()

Returns:
  the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.

#### copy

    public Composite copy(CFMetaData cfm,
                          AbstractAllocator allocator)