Package alluxio.underfs.options
Class OpenOptions
- java.lang.Object
-
- alluxio.underfs.options.OpenOptions
-
@PublicApi @NotThreadSafe public final class OpenOptions extends java.lang.Object
Method options for file locations inUnderFileSystem
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpenOptions
defaults()
boolean
equals(java.lang.Object o)
long
getLength()
long
getOffset()
boolean
getPositionShort()
boolean
getRecoverFailedOpen()
int
hashCode()
OpenOptions
setLength(long length)
OpenOptions
setOffset(long offset)
Sets the offset from the start of a file to be opened for reading.OpenOptions
setPositionShort(boolean positionShort)
OpenOptions
setRecoverFailedOpen(boolean recover)
java.lang.String
toString()
-
-
-
Method Detail
-
defaults
public static OpenOptions defaults()
- Returns:
- the default
OpenOptions
-
getOffset
public long getOffset()
- Returns:
- offset from the start of a file in bytes
-
getLength
public long getLength()
- Returns:
- the maximum length of a file
-
getRecoverFailedOpen
public boolean getRecoverFailedOpen()
- Returns:
- true if failed open attempts should be recovered
-
getPositionShort
public boolean getPositionShort()
- Returns:
- true, if the operation is using positioned read to a small buffer size
-
setOffset
public OpenOptions setOffset(long offset)
Sets the offset from the start of a file to be opened for reading.- Parameters:
offset
- within a file in bytes- Returns:
- the updated option object
-
setLength
public OpenOptions setLength(long length)
- Parameters:
length
- the maximum length of the file- Returns:
- the updated option object
-
setRecoverFailedOpen
public OpenOptions setRecoverFailedOpen(boolean recover)
- Parameters:
recover
- true if failed open attempts should be recovered- Returns:
- the updated option object
-
setPositionShort
public OpenOptions setPositionShort(boolean positionShort)
- Parameters:
positionShort
- whether the operation is positioned read to a small buffer- Returns:
- the updated option object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-