-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into python-table-defini…
…tion
- Loading branch information
Showing
108 changed files
with
3,458 additions
and
1,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
Util/channel/src/main/java/io/deephaven/util/channel/CompletableOutputStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.util.channel; | ||
|
||
import java.io.IOException; | ||
import java.io.OutputStream; | ||
|
||
/** | ||
* An {@link OutputStream} that can be marked as done, completed, or rolled back. | ||
* <p> | ||
* The {@link #done()} method is used to flush all buffered data to the underlying storage, {@link #complete()} to | ||
* finalize the write operation, and {@link #rollback()} to cancel the write. Closing this output stream without calling | ||
* complete will not flush data to the underlying storage. | ||
* <p> | ||
* One usage pattern can be like this: | ||
* | ||
* <pre> | ||
* try (final CompletableOutputStream outputStream = CreateCompletableOutputStream()) { | ||
* try { | ||
* IOUtils.copy(inputStream, outputStream); | ||
* outputStream.done(); // Optional; use this to flush buffered data without completing the stream | ||
* outputStream.complete(); | ||
* } catch (IOException e) { | ||
* outputStream.rollback(); | ||
* } | ||
* } | ||
* </pre> | ||
*/ | ||
public abstract class CompletableOutputStream extends OutputStream { | ||
|
||
/** | ||
* Flush all buffered data to the underlying storage. This is optional and should be called after the user is done | ||
* writing to the output stream. All writes to the output stream after calling this method will lead to an | ||
* {@link IOException}. | ||
*/ | ||
public abstract void done() throws IOException; | ||
|
||
/** | ||
* Flush all buffered data and save all written data to the underlying storage. This method should be called after | ||
* the user is done writing to the output stream. All writes to the output stream after calling this method will | ||
* lead to an {@link IOException}. | ||
*/ | ||
public abstract void complete() throws IOException; | ||
|
||
/** | ||
* Try to roll back any data written to the underlying storage, reverting back to the original state before opening | ||
* this stream. This is an optional operation, as some implementations may not be able to support it. | ||
*/ | ||
public abstract void rollback() throws IOException; | ||
} |
86 changes: 0 additions & 86 deletions
86
Util/channel/src/main/java/io/deephaven/util/channel/LocalFSChannelProvider.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.