Class StaticCache.LockSafeInputStream

All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:

static class StaticCache.LockSafeInputStream extends FilterInputStream
A lock-safe input stream that releases the associated read lock when the stream is closed.

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.