Class BlockBasedFile.LazyChannel
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.BlockBasedFile.LazyChannel
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,DfsBlockCache.ReadableChannelSupplier
- Enclosing class:
- BlockBasedFile
private static class BlockBasedFile.LazyChannel extends java.lang.Object implements java.lang.AutoCloseable, DfsBlockCache.ReadableChannelSupplier
A supplier of readable channel that opens the channel lazily.
-
-
Field Summary
Fields Modifier and Type Field Description private DfsReader
ctx
private DfsPackDescription
desc
private PackExt
ext
private ReadableChannel
rc
-
Constructor Summary
Constructors Constructor Description LazyChannel(DfsReader ctx, DfsPackDescription desc, PackExt ext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ReadableChannel
get()
-
-
-
Field Detail
-
ctx
private final DfsReader ctx
-
desc
private final DfsPackDescription desc
-
ext
private final PackExt ext
-
rc
private ReadableChannel rc
-
-
Constructor Detail
-
LazyChannel
LazyChannel(DfsReader ctx, DfsPackDescription desc, PackExt ext)
-
-
Method Detail
-
get
public ReadableChannel get() throws java.io.IOException
- Specified by:
get
in interfaceDfsBlockCache.ReadableChannelSupplier
- Returns:
- ReadableChannel
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
-