Package org.apache.hadoop.fs.impl
Class StoreImplementationUtils
java.lang.Object
org.apache.hadoop.fs.impl.StoreImplementationUtils
Utility classes to help implementing filesystems and streams.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasCapability(InputStream in, String capability) Probe for an input stream having a capability; returns true if the stream implementsStreamCapabilitiesand itshasCapabilities()method returns true for the capability.static booleanhasCapability(OutputStream out, String capability) Probe for an output stream having a capability; returns true if the stream implementsStreamCapabilitiesand itshasCapabilities()method returns true for the capability.static booleanisProbeForSyncable(String capability) Check the probe capability being forStreamCapabilities.HSYNCorStreamCapabilities.HFLUSHSyncable.hsync()andSyncable.hflush()functionality.
-
Method Details
-
isProbeForSyncable
Check the probe capability being forStreamCapabilities.HSYNCorStreamCapabilities.HFLUSHSyncable.hsync()andSyncable.hflush()functionality.- Parameters:
capability- capability string.- Returns:
- true if either refers to one of the Syncable operations.
-
hasCapability
Probe for an output stream having a capability; returns true if the stream implementsStreamCapabilitiesand itshasCapabilities()method returns true for the capability.- Parameters:
out- output streamcapability- capability to probe for- Returns:
- true if the stream declares that it supports the capability.
-
hasCapability
Probe for an input stream having a capability; returns true if the stream implementsStreamCapabilitiesand itshasCapabilities()method returns true for the capability.- Parameters:
in- input streamcapability- capability to probe for- Returns:
- true if the stream declares that it supports the capability.
-