diff options
Diffstat (limited to 'same/src/main/java/com')
3 files changed, 11 insertions, 1 deletions
diff --git a/same/src/main/java/com/orbekk/same/ConnectionManager.java b/same/src/main/java/com/orbekk/same/ConnectionManager.java index 27560ca..895a6f5 100644 --- a/same/src/main/java/com/orbekk/same/ConnectionManager.java +++ b/same/src/main/java/com/orbekk/same/ConnectionManager.java @@ -15,6 +15,8 @@ */ package com.orbekk.same; +import com.orbekk.protobuf.RpcChannel; + /** * An interface that returns a connection for a participant. * @@ -25,4 +27,5 @@ public interface ConnectionManager { Services.Client getClient0(String location); Services.Directory getDirectory(String location); Services.Paxos getPaxos0(String location); + RpcChannel getChannel(String location); } diff --git a/same/src/main/java/com/orbekk/same/ConnectionManagerImpl.java b/same/src/main/java/com/orbekk/same/ConnectionManagerImpl.java index 0f5cf00..dd0288c 100644 --- a/same/src/main/java/com/orbekk/same/ConnectionManagerImpl.java +++ b/same/src/main/java/com/orbekk/same/ConnectionManagerImpl.java @@ -65,7 +65,8 @@ public class ConnectionManagerImpl implements ConnectionManager { return true; } - private RpcChannel getChannel(String location) { + @Override + public RpcChannel getChannel(String location) { Future<RpcChannel> channel = channels.get(location); if (channel == null) { if (!isValidLocation(location)) { diff --git a/same/src/main/java/com/orbekk/same/TestConnectionManager.java b/same/src/main/java/com/orbekk/same/TestConnectionManager.java index 27b41b2..609b1c7 100644 --- a/same/src/main/java/com/orbekk/same/TestConnectionManager.java +++ b/same/src/main/java/com/orbekk/same/TestConnectionManager.java @@ -18,6 +18,7 @@ package com.orbekk.same; import java.util.Map; import java.util.HashMap; +import com.orbekk.protobuf.RpcChannel; import com.orbekk.same.Services.Directory; import com.orbekk.same.Services.Master; import com.orbekk.same.Services.Paxos; @@ -57,4 +58,9 @@ public class TestConnectionManager implements ConnectionManager { public Services.Paxos getPaxos0(String location) { return paxosMap0.get(location); } + + @Override + public RpcChannel getChannel(String location) { + throw new RuntimeException("Not implemented."); + } } |