org.apache.cassandra.utils.concurrent

## Interface SharedCloseable

- All Superinterfaces:
    java.lang.AutoCloseable
  All Known Subinterfaces:
    IFilter
  All Known Implementing Classes:
    AlwaysPresentFilter, BloomFilter, ChannelProxy, FileHandle, IndexSummary, MmappedRegions, SafeMemory, SharedCloseableImpl, WrappedSharedCloseable

      public interface SharedCloseable
      extends java.lang.AutoCloseable

  A simple extension of AutoCloseable, that represents a resource that can be utilised in multiple locations, each managing their own closure of the resource, so that when the last such instance is closed all are.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTo(Ref.IdentityCollection identities)`
    `java.lang.Throwable` | `close(java.lang.Throwable accumulate)`
    `SharedCloseable` | `sharedCopy()`

    - ### Methods inherited from interface java.lang.AutoCloseable

      `close`

- - ### Method Detail

    - #### sharedCopy

          SharedCloseable sharedCopy()

      Returns:
        a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.

    - #### close

          java.lang.Throwable close(java.lang.Throwable accumulate)

    - #### addTo

          void addTo(Ref.IdentityCollection identities)

Copyright © 2018 The Apache Software Foundation