static class StaticCache.LockSafeOutputStream
extends java.io.FilterOutputStream
NOTE! It is important that we keep a strong reference to the 'key' in this class until the stream is closed, since otherwise the locked entry may be reclaimed by the garbage collector.
Modifier and Type | Field and Description |
---|---|
private java.lang.Throwable |
calledFrom |
private boolean |
closed |
private java.lang.String |
key |
private java.util.concurrent.locks.ReadWriteLock |
lock |
Constructor and Description |
---|
StaticCache.LockSafeOutputStream(java.io.OutputStream out,
StaticCache.LockEntry lock) |
private final java.lang.Throwable calledFrom
private java.util.concurrent.locks.ReadWriteLock lock
private java.lang.String key
private boolean closed
StaticCache.LockSafeOutputStream(java.io.OutputStream out, StaticCache.LockEntry lock)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Object