Skip to content

Commit

Permalink
Migrate from CorfuTable to ICorfuTable (#246)
Browse files Browse the repository at this point in the history
The concrete implementation of CorfuTable no longer exists, and it
needs to be replaced with ICorfuTable/PersistentCorfuTable.
  • Loading branch information
vjeko authored Jul 5, 2023
1 parent ac99c9a commit 2e410d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -28,7 +28,7 @@ public interface CorfuClient extends Node<ClientParams> {
* @param streamName stream name of the table
* @return CorfuTable object created by runtime
*/
<K, V> CorfuTable<K, V> createDefaultCorfuTable(String streamName);
<K, V> ICorfuTable<K, V> createDefaultCorfuTable(String streamName);

/**
* See {@link CorfuRuntime#connect()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -101,10 +102,10 @@ public IpAddress getNetworkInterface() {
}

@Override
public <K, V> CorfuTable<K, V> createDefaultCorfuTable(String streamName) {
public <K, V> ICorfuTable<K, V> createDefaultCorfuTable(String streamName) {
return runtime.getObjectsView()
.build()
.setTypeToken(new TypeToken<CorfuTable<K, V>>() {
.setTypeToken(new TypeToken<PersistentCorfuTable<K, V>>() {
})
.setStreamName(streamName)
.open();
Expand Down

0 comments on commit 2e410d1

Please sign in to comment.