diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-24 13:43:03 +0200 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-04-24 13:49:55 +0200 |
commit | 76c9a88c6bdd21cf1449aa362e7b6fea8d343e52 (patch) | |
tree | f698b8407e5b526e9947b047db8d0dfd4fe0ba37 /same | |
parent | 8c0633f4d9055c6710b170e40bb006ed8fc3a0c0 (diff) |
Remove unused code.
Diffstat (limited to 'same')
6 files changed, 5 insertions, 16 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java index f9bd2a9..1b99ce4 100644 --- a/same/src/main/java/com/orbekk/same/Client.java +++ b/same/src/main/java/com/orbekk/same/Client.java @@ -1,7 +1,5 @@ package com.orbekk.same; -import static com.orbekk.same.StackTraceUtil.throwableToString; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.CancellationException; @@ -30,13 +28,11 @@ public class Client { private volatile String myUrl; private volatile String myLocation; private volatile MasterController masterController = null; - private final Broadcaster broadcaster; private volatile Future<Integer> currentMasterProposal = null; private volatile MasterState masterInfo; private List<StateChangedListener> stateListeners = new ArrayList<StateChangedListener>(); - private NetworkNotificationListener networkListener; public class ClientInterfaceImpl implements ClientInterface { private ClientInterfaceImpl() { @@ -203,12 +199,11 @@ public class Client { }; public Client(State state, ConnectionManager connections, - String myUrl, String myLocation, Broadcaster broadcaster) { + String myUrl, String myLocation) { this.state = state; this.connections = connections; this.myUrl = myUrl; this.myLocation = myLocation; - this.broadcaster = broadcaster; } public void start() { @@ -280,10 +275,6 @@ public class Client { return state; } - public void setNetworkListener(NetworkNotificationListener listener) { - this.networkListener = listener; - } - public ClientService getService() { return serviceImpl; } diff --git a/same/src/main/java/com/orbekk/same/SameController.java b/same/src/main/java/com/orbekk/same/SameController.java index 8aeebd6..c44d3bb 100644 --- a/same/src/main/java/com/orbekk/same/SameController.java +++ b/same/src/main/java/com/orbekk/same/SameController.java @@ -67,8 +67,7 @@ public class SameController { MasterServiceProxy master = new MasterServiceProxy(); Client client = new Client(clientState, connections, - clientUrl, myLocation, - BroadcasterImpl.getDefaultBroadcastRunner()); + clientUrl, myLocation); PaxosServiceImpl paxos = new PaxosServiceImpl(""); StateServlet stateServlet = new StateServlet(client.getInterface(), new VariableFactory(client.getInterface())); diff --git a/same/src/main/java/com/orbekk/same/benchmark/ClientBenchmark.java b/same/src/main/java/com/orbekk/same/benchmark/ClientBenchmark.java index a2fc663..4e18416 100644 --- a/same/src/main/java/com/orbekk/same/benchmark/ClientBenchmark.java +++ b/same/src/main/java/com/orbekk/same/benchmark/ClientBenchmark.java @@ -7,7 +7,6 @@ import java.util.concurrent.CountDownLatch; import com.google.protobuf.RpcCallback; import com.orbekk.protobuf.RpcChannel; import com.orbekk.protobuf.Rpc; -import com.orbekk.protobuf.RpcChannel; import com.orbekk.same.benchmark.Example.Data; public class ClientBenchmark { diff --git a/same/src/test/java/com/orbekk/same/ClientTest.java b/same/src/test/java/com/orbekk/same/ClientTest.java index 1781ef3..4dbc408 100644 --- a/same/src/test/java/com/orbekk/same/ClientTest.java +++ b/same/src/test/java/com/orbekk/same/ClientTest.java @@ -18,7 +18,7 @@ public class ClientTest { private State state = new State("ClientNetwork"); private TestConnectionManager connections = new TestConnectionManager(); private Client client = new Client(state, connections, - "http://client/ClientService.json", "clientLocation", null); + "http://client/ClientService.json", "clientLocation"); private ClientService clientS = client.getService(); private MasterService mockMaster = mock(MasterService.class); diff --git a/same/src/test/java/com/orbekk/same/FunctionalTest.java b/same/src/test/java/com/orbekk/same/FunctionalTest.java index b0df4dc..da1faca 100644 --- a/same/src/test/java/com/orbekk/same/FunctionalTest.java +++ b/same/src/test/java/com/orbekk/same/FunctionalTest.java @@ -48,7 +48,7 @@ public class FunctionalTest { Client newClient(String clientName, String clientUrl, String location) { Client client = new Client(new State(clientName), connections, - clientUrl, location, broadcaster); + clientUrl, location); connections.clientMap.put(clientUrl, client.getService()); connections.clientMap0.put(location, client.getNewService()); clients.add(client); diff --git a/same/src/test/java/com/orbekk/same/MasterTest.java b/same/src/test/java/com/orbekk/same/MasterTest.java index f244d1b..b3cfb94 100644 --- a/same/src/test/java/com/orbekk/same/MasterTest.java +++ b/same/src/test/java/com/orbekk/same/MasterTest.java @@ -50,7 +50,7 @@ public class MasterTest { public void clientJoin() throws Exception { Client client = new Client( new State("ClientNetwork"), connections, - "http://client/ClientService.json", "clientLocation", null); + "http://client/ClientService.json", "clientLocation"); connections.clientMap0.put("clientLocation", client.getNewService()); client.joinNetwork(master.getMasterInfo()); master.performWork(); |