Uses of Interface org.apache.cassandra.utils.concurrent.RefCounted (apache-cassandra API)
Date: 2018-02-14

## Uses of Interface
org.apache.cassandra.utils.concurrent.RefCounted

- Packages that use RefCounted
  Package | Description
  --- | ---
  org.apache.cassandra.io.sstable.format |
  org.apache.cassandra.io.sstable.format.big |
  org.apache.cassandra.utils.concurrent |

- - ### Uses of RefCounted in org.apache.cassandra.io.sstable.format

    Classes in org.apache.cassandra.io.sstable.format that implement RefCounted
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SSTableReader` An SSTableReader can be constructed in a number of places, but typically is either read from disk at startup, or constructed from a flushed memtable, or after compaction to replace some existing sstables.

  - ### Uses of RefCounted in org.apache.cassandra.io.sstable.format.big

    Classes in org.apache.cassandra.io.sstable.format.big that implement RefCounted
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BigTableReader` SSTableReaders are open()ed by Keyspace.onStart; after that they are created by SSTableWriter.renameAndOpen.

  - ### Uses of RefCounted in org.apache.cassandra.utils.concurrent

    Classes in org.apache.cassandra.utils.concurrent with type parameters of type RefCounted
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Refs<T extends RefCounted<T>>` A collection of managed Ref references to RefCounted objects, and the objects they are referencing.

    Subinterfaces of RefCounted in org.apache.cassandra.utils.concurrent
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `SelfRefCounted<T extends SelfRefCounted<T>>`

    Classes in org.apache.cassandra.utils.concurrent that implement RefCounted
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Ref<T>` An object that needs ref counting does the two following: - defines a Tidy object that will cleanup once it's gone, (this must retain no references to the object we're tracking (only its resources and how to clean up)) Then, one of two options: 1) Construct a Ref directly pointing to it, and always use this Ref; or 2) - implements RefCounted - encapsulates a Ref, we'll call selfRef, to which it proxies all calls to RefCounted behaviours - users must ensure no references to the selfRef leak, or are retained outside of a method scope.

    Methods in org.apache.cassandra.utils.concurrent with type parameters of type RefCounted
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends RefCounted<T>> Refs<T>` | Refs.`ref(java.lang.Iterable<T> reference)`
    `static <T extends RefCounted<T>> Refs<T>` | Refs.`tryRef(java.lang.Iterable<T> reference)` Acquire a reference to all of the provided objects, or none

Copyright © 2018 The Apache Software Foundation