Top Fields Constructors Methods
com.github.luben.zstd

pack-priv abstract Class AutoCloseBase

extends Object
implements Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
com.github.luben.zstd.SharedDictBase, com.github.luben.zstd.ZstdCompressCtx, com.github.luben.zstd.ZstdDecompressCtx
Imports
java.io.Closeable, java.util.concurrent.atomic.AtomicIntegerFieldUpdater

Field Summary

Modifier and TypeField and Description
private static final int
private static final AtomicIntegerFieldUpdater<AutoCloseBase>
private volatile int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
acquireSharedLock()

For private library usage only.

public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
pack-priv abstract void
pack-priv void
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SHARED_LOCK_CLOSEDback to summary
private static final int SHARED_LOCK_CLOSED
SHARED_LOCK_UPDATERback to summary
private static final AtomicIntegerFieldUpdater<AutoCloseBase> SHARED_LOCK_UPDATER
sharedLockback to summary
private volatile int sharedLock

Constructor Detail

AutoCloseBaseback to summary
pack-priv AutoCloseBase()

Method Detail

acquireSharedLockback to summary
pack-priv void acquireSharedLock()

For private library usage only. This call must be paired with a try block with releaseSharedLock() in the finally block.

closeback to summary
public void close()

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
doCloseback to summary
pack-priv abstract void doClose()
releaseSharedLockback to summary
pack-priv void releaseSharedLock()
storeFenceback to summary
pack-priv void storeFence()