Package org.apache.hadoop.hdfs.util
Class BestEffortLongFile
java.lang.Object
org.apache.hadoop.hdfs.util.BestEffortLongFile
- All Implemented Interfaces:
Closeable,AutoCloseable
Class that represents a file on disk which stores a single
long
value, but does not make any effort to make it truly durable. This is in
contrast to PersistentLongFile which fsync()s the value on every
change.
This should be used for values which are updated frequently (such that
performance is important) and not required to be up-to-date for correctness.
This class also differs in that it stores the value as binary data instead
of a textual string.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BestEffortLongFile
-
-
Method Details
-
get
- Throws:
IOException
-
set
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-