-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add feature to control systemic property of executeCode (#6519)
Add markThreadNotSystemic() to support Core+, systemic object tracking in PQs --------- Co-authored-by: Charles P. Wright <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,662 additions
and
1,366 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
Large diffs are not rendered by default.
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
66 changes: 66 additions & 0 deletions
66
java-client/session/src/main/java/io/deephaven/client/impl/ExecuteCodeOptions.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,66 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.client.impl; | ||
|
||
import io.deephaven.annotations.BuildableStyle; | ||
import org.immutables.value.Value; | ||
|
||
/** | ||
* An object to control the behavior of the {@link ConsoleSession#executeCode(String, ExecuteCodeOptions) executeCode} | ||
* API | ||
*/ | ||
@Value.Immutable | ||
@BuildableStyle | ||
public interface ExecuteCodeOptions { | ||
/** | ||
* The default options. See the method javadoc for default values. | ||
*/ | ||
ExecuteCodeOptions DEFAULT = ExecuteCodeOptions.builder().build(); | ||
|
||
enum SystemicType { | ||
ServerDefault, Systemic, NotSystemic | ||
} | ||
|
||
/** | ||
* If the code should be executed systemically or not. When code is executed systemically, failures of the script or | ||
* tables in the script are fatal. | ||
* | ||
* <p> | ||
* The default value is {@code null} which uses the system default behavior. See the documentation for | ||
* SystemicObjectTracker for more details. | ||
* </p> | ||
* | ||
* @return if the code should be systemically executed. | ||
*/ | ||
@Value.Default | ||
default SystemicType executeSystemic() { | ||
return SystemicType.ServerDefault; | ||
} | ||
|
||
/** | ||
* Create a new options builder. | ||
* | ||
* @return a new builder | ||
*/ | ||
static Builder builder() { | ||
return ImmutableExecuteCodeOptions.builder(); | ||
} | ||
|
||
interface Builder { | ||
/** | ||
* Set if the code should be executed systemically or not. A value of {@code null} uses default system behavior. | ||
* | ||
* @param systemicType if the code should be executed systemically. | ||
* @return this {@link Builder} | ||
*/ | ||
ExecuteCodeOptions.Builder executeSystemic(SystemicType systemicType); | ||
|
||
/** | ||
* Create a new {@link ExecuteCodeOptions} from the state of this builder. | ||
* | ||
* @return a new {@link ExecuteCodeOptions} | ||
*/ | ||
ExecuteCodeOptions build(); | ||
} | ||
} |
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
Large diffs are not rendered by default.
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
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
Oops, something went wrong.