Package com.hierynomus.mssmb2
Enum Class SMB2LeaseState
- All Implemented Interfaces:
EnumWithValue<SMB2LeaseState>,Serializable,Comparable<SMB2LeaseState>,Constable
SMB2 lease state bitmask ([MS-SMB2] 2.2.13.2.8 LeaseState). A directory lease is
granted at most
RH (the server strips WRITE_CACHING for directories).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface com.hierynomus.protocol.commons.EnumWithValue
EnumWithValue.EnumUtils -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionlonggetValue()static booleanisHandle(long state) static booleanisRead(long state) static booleanisReadHandle(long state) Read+Handle caching (0x3) — the useful directory lease.static booleanisWrite(long state) static longThe RH bitmask value (0x3).static SMB2LeaseStateReturns the enum constant of this class with the specified name.static SMB2LeaseState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SMB2_LEASE_NONE
-
SMB2_LEASE_READ_CACHING
-
SMB2_LEASE_HANDLE_CACHING
-
SMB2_LEASE_WRITE_CACHING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public long getValue()- Specified by:
getValuein interfaceEnumWithValue<SMB2LeaseState>
-
isRead
public static boolean isRead(long state) -
isHandle
public static boolean isHandle(long state) -
isWrite
public static boolean isWrite(long state) -
isReadHandle
public static boolean isReadHandle(long state) Read+Handle caching (0x3) — the useful directory lease. -
readHandle
public static long readHandle()The RH bitmask value (0x3).
-