Package 

Class SynchronizedStreamAccessRomBuffer

  • All Implemented Interfaces:
    java.io.Closeable , java.lang.AutoCloseable

    
    public final class SynchronizedStreamAccessRomBuffer
    extends RomBuffer
                        

    Buffer implements thread safe in terms of underlying stream read/seek operations. Implementation isn't thread safe in terms of concurrent class instance. Current architecture is used due to implementation details of big library where concurrent operations results only in concurrent underlying big file resource usage. E.g. we can keep opened BigWigFile for file provided by http stream. Concurrent file access requires as to support concurrent http stream access. This implementation delegates all i/o to underlying LightweightRomBuffer instance, which do seek before any read operation. All i/o operations delegation is made in synchronized sections to ensure that seek and read operations performed by LightweightRomBuffer for underlying EndianSeekableDataInput stream are consistent.