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 boolean
closed
-
Constructor Summary
Constructors Constructor Description RefCountedFile(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
int
getReferenceCounter()
boolean
release()
Decreases the reference counter.void
retain()
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:RefCounted
Increases the reference counter.- Specified by:
retain
in interfaceRefCounted
-
release
public boolean release()
Description copied from interface:RefCounted
Decreases the reference counter.- Specified by:
release
in interfaceRefCounted
- Returns:
true
if the reference counter reached 0,false
otherwise.
-
getReferenceCounter
public int getReferenceCounter()
-
-