Reformat rest of the design patterns - Issue #224

This commit is contained in:
Ankur Kaushal
2015-11-01 21:29:13 -05:00
parent 449340bd2b
commit 306b1f3d31
337 changed files with 6744 additions and 6851 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 = {};