From 2e410d1d87ae5264e6f17d2da88a30fa9fd652d0 Mon Sep 17 00:00:00 2001 From: Vjekoslav Brajkovic <77466+vjeko@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:25:53 -0700 Subject: [PATCH] Migrate from CorfuTable to ICorfuTable (#246) The concrete implementation of CorfuTable no longer exists, and it needs to be replaced with ICorfuTable/PersistentCorfuTable. --- .../corfudb/universe/universe/node/client/CorfuClient.java | 4 ++-- .../universe/universe/node/client/LocalCorfuClient.java | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/CorfuClient.java b/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/CorfuClient.java index b6455b51..28ade51c 100644 --- a/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/CorfuClient.java +++ b/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/CorfuClient.java @@ -1,7 +1,7 @@ package org.corfudb.universe.universe.node.client; import org.corfudb.runtime.CorfuRuntime; -import org.corfudb.runtime.collections.CorfuTable; +import org.corfudb.runtime.collections.ICorfuTable; import org.corfudb.runtime.exceptions.UnreachableClusterException; import org.corfudb.runtime.view.Layout; import org.corfudb.runtime.view.LayoutView; @@ -28,7 +28,7 @@ public interface CorfuClient extends Node { * @param streamName stream name of the table * @return CorfuTable object created by runtime */ - CorfuTable createDefaultCorfuTable(String streamName); + ICorfuTable createDefaultCorfuTable(String streamName); /** * See {@link CorfuRuntime#connect()} diff --git a/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/LocalCorfuClient.java b/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/LocalCorfuClient.java index aff0d4bc..e5b4e4a8 100644 --- a/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/LocalCorfuClient.java +++ b/universe/universe-core/src/main/java/org/corfudb/universe/universe/node/client/LocalCorfuClient.java @@ -7,7 +7,8 @@ import lombok.extern.slf4j.Slf4j; import org.corfudb.runtime.CorfuRuntime; import org.corfudb.runtime.CorfuRuntime.CorfuRuntimeParameters.CorfuRuntimeParametersBuilder; -import org.corfudb.runtime.collections.CorfuTable; +import org.corfudb.runtime.collections.ICorfuTable; +import org.corfudb.runtime.collections.PersistentCorfuTable; import org.corfudb.runtime.view.Layout; import org.corfudb.runtime.view.ManagementView; import org.corfudb.runtime.view.ObjectsView; @@ -101,10 +102,10 @@ public IpAddress getNetworkInterface() { } @Override - public CorfuTable createDefaultCorfuTable(String streamName) { + public ICorfuTable createDefaultCorfuTable(String streamName) { return runtime.getObjectsView() .build() - .setTypeToken(new TypeToken>() { + .setTypeToken(new TypeToken>() { }) .setStreamName(streamName) .open();