Skip to content

Commit

Permalink
Upgraded barrage java client
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub committed Sep 12, 2023
1 parent 2dc89a2 commit 19f9c9a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@
</extensions>
</build>
<dependencies>
<!-- Added because of conflict with 4.1.68 -->
<!-- Added because of conflict with 4.1.68 -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.79.Final</version>
</dependency>
<!-- Added because of conflict with 1.41.0 -->
<!-- Added because of conflict with 1.49.1 -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
Expand All @@ -173,7 +173,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.21.9</version>
<version>3.21.7</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
Expand All @@ -183,12 +183,12 @@
<dependency>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-java-client-barrage-dagger</artifactId>
<version>0.22.0</version>
<version>0.28.0</version>
</dependency>
<dependency>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-log-to-slf4j</artifactId>
<version>0.22.0</version>
<version>0.28.0</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
import io.deephaven.client.impl.TableHandle;
import io.deephaven.client.impl.TableHandleManager;
import io.deephaven.client.impl.script.Changes;
import io.deephaven.engine.context.ExecutionContext;
import io.deephaven.engine.table.TableUpdate;
import io.deephaven.engine.table.impl.InstrumentedTableUpdateListener;
import io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph;
import io.deephaven.extensions.barrage.BarrageSnapshotOptions;
import io.deephaven.extensions.barrage.BarrageSubscriptionOptions;
import io.deephaven.extensions.barrage.table.BarrageTable;
Expand Down Expand Up @@ -220,7 +222,15 @@ private BarrageSession getSession(ManagedChannel channel) {
BarrageSessionFactory barrageSessionFactory = DaggerDeephavenBarrageRoot.create().factoryBuilder()
.managedChannel(channel).scheduler(scheduler).allocator(bufferAllocator).build();

return barrageSessionFactory.newBarrageSession();
var barrageSession = barrageSessionFactory.newBarrageSession();
getExecutionContext().open();
return barrageSession;
}

private ExecutionContext getExecutionContext() {
final var updateGraph = PeriodicUpdateGraph.newBuilder("DEFAULT").existingOrBuild();
return ExecutionContext.newBuilder().markSystemic().emptyQueryScope().newQueryLibrary()
.setUpdateGraph(updateGraph).build();
}

record Subscription(TableHandle handle, BarrageSubscription subscription) {
Expand Down

0 comments on commit 19f9c9a

Please sign in to comment.