public class FileReaderManager extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeAndRemoveAllOpenedReaders()
Only for
EnvironmentUtils.cleanEnv method. |
void |
closeFileAndRemoveReader(String filePath) |
boolean |
contains(TsFileResource tsFile,
boolean isClosed)
This method is only for unit tests.
|
void |
decreaseFileReaderReference(TsFileResource tsFile,
boolean isClosed)
Decrease the reference count of the reader specified by filePath.
|
TsFileSequenceReader |
get(String filePath,
boolean isClosed)
Get the reader of the file(tsfile or unseq tsfile) indicated by filePath.
|
static FileReaderManager |
getInstance() |
void |
increaseFileReaderReference(TsFileResource tsFile,
boolean isClosed)
Increase the reference count of the reader specified by filePath.
|
void |
writeFileReferenceInfo() |
public static FileReaderManager getInstance()
public void closeFileAndRemoveReader(String filePath) throws IOException
IOExceptionpublic TsFileSequenceReader get(String filePath, boolean isClosed) throws IOException
filePath - the path of the file, of which the reader is desired.isClosed - whether the corresponding file still receives insertions or not.IOException - when reader cannot be created.public void increaseFileReaderReference(TsFileResource tsFile, boolean isClosed)
public void decreaseFileReaderReference(TsFileResource tsFile, boolean isClosed)
public void closeAndRemoveAllOpenedReaders()
throws IOException
EnvironmentUtils.cleanEnv method. To make sure that unit tests and
integration tests will not conflict with each other.IOExceptionpublic boolean contains(TsFileResource tsFile, boolean isClosed)
public void writeFileReferenceInfo()
Copyright © 2022 The Apache Software Foundation. All rights reserved.