docs/javadoc/reference/com/facebook/common/statfs/StatFsHelper.html
|
|
Summary: Nested Classes | Constants | Protected Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public class
extends Object
| java.lang.Object | | ↳ | com.facebook.common.statfs.StatFsHelper |
Helper class that periodically checks the amount of free space available.
To keep the overhead low, it caches the free space information, and only updates that info after two minutes.
It is a singleton, and is thread-safe.
Initialization is delayed until first use, so the first call to any method may incur some additional cost.
| Nested Classes |
|---|
| enum |
| Constants |
|---|
| long |
| long |
| int |
| long |
| int |
| Protected Constructors |
|---|
| Constructor. |
| Public Methods |
|---|
| long |
| Gets the information about the available storage space either internal or external depends on the give input |
| long |
| Gets the information about the free storage space, including reserved blocks, either internal or external depends on the given input |
| synchronized static StatFsHelper |
| long |
| Gets the information about the total storage space, either internal or external depends on the given input |
| boolean |
| boolean |
| boolean |
| void |
| Thread-safe call to reset the disk stats. |
| boolean |
| Check if available space in the filesystem is greater than the given threshold. |
| Protected Methods |
|---|
| static StatFs |
| [Expand] Inherited Methods | | --- | | From class java.lang.Object
| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |
|
Constant Value: 1048576000 (0x000000003e800000)
Constant Value: 104857600 (0x0000000006400000)
Constant Value: 100 (0x00000064)
Constant Value: 419430400 (0x0000000019000000)
Constant Value: 400 (0x00000190)
Constructor.
Initialization is delayed until first use, so we must call #ensureInitialized() when implementing member methods.
Gets the information about the available storage space either internal or external depends on the give input
| storageType | Internal or external storage type |
Gets the information about the free storage space, including reserved blocks, either internal or external depends on the given input
| storageType | Internal or external storage type |
Gets the information about the total storage space, either internal or external depends on the given input
| storageType | Internal or external storage type |
Thread-safe call to reset the disk stats. If we know that the free space has changed recently (for example, if we have deleted files), use this method to reset the internal state and start tracking disk stats afresh, resetting the internal timer for updating stats.
Check if available space in the filesystem is greater than the given threshold. Note that the free space stats are cached and updated in intervals of RESTAT_INTERVAL_MS. If the amount of free space has crossed over the threshold since the last update, it will return incorrect results till the space stats are updated again.
| storageType | StorageType (internal or external) to test | | freeSpaceThreshold | compare the available free space to this size |
+Generated by Doclava. +