public abstract class AbstractFileStateHandle extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractFileStateHandle(Path filePath)
Creates a new file state for the given file path.
|
Modifier and Type | Method and Description |
---|---|
void |
discardState()
Discard the state by deleting the file that stores the state.
|
Path |
getFilePath()
Gets the path where this handle's state is stored.
|
protected long |
getFileSize()
Returns the file size in bytes.
|
protected FileSystem |
getFileSystem()
Gets the file system that stores the file state.
|
protected AbstractFileStateHandle(Path filePath)
filePath
- The path to the file that stores the state.public Path getFilePath()
public void discardState() throws Exception
Exception
- Thrown, if the file deletion (not the directory deletion) fails.protected FileSystem getFileSystem() throws IOException
IOException
- Thrown if the file system cannot be accessed.protected long getFileSize() throws IOException
IOException
- Thrown if the file system cannot be accessed.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.