Package org.apache.flink.core.fs
Class RefCountedFile
- java.lang.Object
-
- org.apache.flink.core.fs.RefCountedFile
-
- All Implemented Interfaces:
RefCounted
- Direct Known Subclasses:
RefCountedFileWithStream
@Internal public class RefCountedFile extends Object implements RefCounted
A reference counted file which is deleted as soon as no caller holds a reference to the wrappedFile.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanclosed
-
Constructor Summary
Constructors Constructor Description RefCountedFile(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilegetFile()intgetReferenceCounter()booleanrelease()Decreases the reference counter.voidretain()Increases the reference counter.
-
-
-
Constructor Detail
-
RefCountedFile
public RefCountedFile(File file)
-
-
Method Detail
-
getFile
public File getFile()
-
retain
public void retain()
Description copied from interface:RefCountedIncreases the reference counter.- Specified by:
retainin interfaceRefCounted
-
release
public boolean release()
Description copied from interface:RefCountedDecreases the reference counter.- Specified by:
releasein interfaceRefCounted- Returns:
trueif the reference counter reached 0,falseotherwise.
-
getReferenceCounter
public int getReferenceCounter()
-
-