public class DirectoryStreamStateHandle extends DirectoryStateHandle implements StreamStateHandle
DirectoryStateHandle
to a StreamStateHandle
.StateObject.StateObjectLocation, StateObject.StateObjectSizeStatsCollector
Constructor and Description |
---|
DirectoryStreamStateHandle(Path directory,
long directorySize) |
Modifier and Type | Method and Description |
---|---|
Optional<byte[]> |
asBytesIfInMemory() |
SharedStateRegistryKey |
createStateRegistryKey() |
boolean |
equals(Object o) |
static DirectoryStreamStateHandle |
forPathWithZeroSize(Path directory)
Return a
DirectoryStreamStateHandle with zero size, which usually used to be
registered to SharedStateRegistry to track the life
cycle of the directory, therefore a fake size is provided. |
PhysicalStateHandleID |
getStreamStateHandleID() |
FSDataInputStream |
openInputStream()
Returns an
FSDataInputStream that can be used to read back the data that was
previously written to the stream. |
String |
toString() |
collectSizeStats, discardState, forPathWithSize, getDirectory, getStateSize, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
collectSizeStats, discardState, getStateSize
public FSDataInputStream openInputStream()
StreamStateHandle
FSDataInputStream
that can be used to read back the data that was
previously written to the stream.openInputStream
in interface StreamStateHandle
public Optional<byte[]> asBytesIfInMemory()
asBytesIfInMemory
in interface StreamStateHandle
public PhysicalStateHandleID getStreamStateHandleID()
getStreamStateHandleID
in interface StreamStateHandle
public SharedStateRegistryKey createStateRegistryKey()
public boolean equals(Object o)
equals
in class DirectoryStateHandle
public String toString()
toString
in class DirectoryStateHandle
public static DirectoryStreamStateHandle forPathWithZeroSize(@Nonnull Path directory)
DirectoryStreamStateHandle
with zero size, which usually used to be
registered to SharedStateRegistry
to track the life
cycle of the directory, therefore a fake size is provided.directory
- the directory.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.