Merge pull request #281 from ankurkaushal/master

Reformat according to google style guide
This commit is contained in:
Ilkka Seppälä
2015-11-02 21:39:17 +02:00
438 changed files with 8257 additions and 8382 deletions

View File

@@ -46,7 +46,7 @@ public class LoadBalancer {
Server server = servers.get(lastServedId++);
server.serve(request);
}
}

View File

@@ -2,7 +2,7 @@ package com.iluwatar.monostate;
/**
*
* The Request class. A {@link Server} can handle an instance of a Request.
* The Request class. A {@link Server} can handle an instance of a Request.
*
*/

View File

@@ -2,8 +2,8 @@ package com.iluwatar.monostate;
/**
*
* The Server class. Each Server sits behind a LoadBalancer which delegates the call to the
* servers in a simplistic Round Robin fashion.
* The Server class. Each Server sits behind a LoadBalancer which delegates the call to the servers
* in a simplistic Round Robin fashion.
*
*/
public class Server {
@@ -26,6 +26,7 @@ public class Server {
}
public final void serve(Request request) {
System.out.println("Server ID " + id + " associated to host : " + getHost() + " and Port " + getPort() +" Processed request with value " + request.value);
System.out.println("Server ID " + id + " associated to host : " + getHost() + " and Port "
+ getPort() + " Processed request with value " + request.value);
}
}

View File

@@ -15,7 +15,7 @@ public class AppTest {
// Both Should have the same LastServedId
Assert.assertTrue(balancer.getLastServedId() == balancer2.getLastServedId());
}
@Test
public void testMain() {
String[] args = {};