public class HotFileFromJava extends Object implements HotFile
| Modifier and Type | Field and Description |
|---|---|
protected AutoCloseable |
cancelAction |
protected ConcurrentFileEndpoint |
endpoint |
| Constructor and Description |
|---|
HotFileFromJava(ConcurrentFileEndpoint endpoint,
AutoCloseable cancelAction) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Optional method to cancel the creation
|
CompletableFuture<Path> |
future()
A completable future that fires when the file creation is complete
or an exception occurred
|
InputStream |
newInputStream()
Open a new stream to the hot file
The input stream delivery may be delayed
until after the file creation is complete.
|
String |
toString() |
protected ConcurrentFileEndpoint endpoint
protected AutoCloseable cancelAction
public HotFileFromJava(ConcurrentFileEndpoint endpoint, AutoCloseable cancelAction)
public CompletableFuture<Path> future()
FileCreationfuture in interface FileCreationpublic void abort()
throws Exception
FileCreationabort in interface FileCreationExceptionpublic InputStream newInputStream() throws IOException
HotFilenewInputStream in interface HotFileIOExceptionCopyright © 2020. All rights reserved.