Permalink
Browse files

Added @override to some methods as Eclipse asked me to. Fixed missing…

… include in test.
  • Loading branch information...
1 parent 1890420 commit 31bc42ecae6d32487a5b695c9c06ce54fa3b222e @jayjwylie jayjwylie committed Oct 9, 2012
View
4 META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
-Created-By: 20.8-b03-424 (Apple Inc.)
+Created-By: 20.2-b06 (Sun Microsystems Inc.)
Implementation-Title: Voldemort
-Implementation-Version: 0.90.1
+Implementation-Version: 0.96
Implementation-Vendor: LinkedIn
View
15 src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorPool.java
@@ -132,6 +132,7 @@ public ClientRequestExecutorFactory getFactory() {
return factory;
}
+ @Override
public SocketStore create(String storeName,
String hostName,
int port,
@@ -189,6 +190,7 @@ public void checkin(SocketDestination destination, ClientRequestExecutor clientR
}
}
+ @Override
public void close(SocketDestination destination) {
factory.setLastClosedTimestamp(destination);
queuedPool.reset(destination);
@@ -197,6 +199,7 @@ public void close(SocketDestination destination) {
/**
* Close the socket pool
*/
+ @Override
public void close() {
// unregister MBeans
if(stats != null) {
@@ -269,6 +272,7 @@ protected void updateStats() {
}
}
+ @Override
public void useResource(ClientRequestExecutor clientRequestExecutor) {
updateStats();
if(logger.isDebugEnabled()) {
@@ -297,13 +301,15 @@ public void useResource(ClientRequestExecutor clientRequestExecutor) {
clientRequestExecutor.addClientRequest(clientRequest, timeoutMs);
}
+ @Override
public void handleTimeout() {
// Do *not* invoke updateStats since handleException does so.
long durationNs = System.nanoTime() - startTimeNs;
handleException(new TimeoutException("Could not acquire resource in " + timeoutMs
+ " ms. (Took " + durationNs + " ns.)"));
}
+ @Override
public void handleException(Exception e) {
updateStats();
if(!(e instanceof UnreachableStoreException))
@@ -317,6 +323,7 @@ public void handleException(Exception e) {
}
}
+ @Override
public long getDeadlineNs() {
return startTimeNs + TimeUnit.MILLISECONDS.toNanos(timeoutMs);
}
@@ -373,6 +380,7 @@ private void invokeCallback(Object o, long requestTime) {
}
}
+ @Override
public void complete() {
try {
clientRequest.complete();
@@ -389,33 +397,40 @@ public void complete() {
}
}
+ @Override
public boolean isComplete() {
return isComplete;
}
+ @Override
public boolean formatRequest(DataOutputStream outputStream) {
return clientRequest.formatRequest(outputStream);
}
+ @Override
public T getResult() throws VoldemortException, IOException {
return clientRequest.getResult();
}
+ @Override
public boolean isCompleteResponse(ByteBuffer buffer) {
return clientRequest.isCompleteResponse(buffer);
}
+ @Override
public void parseResponse(DataInputStream inputStream) {
clientRequest.parseResponse(inputStream);
}
+ @Override
public void timeOut() {
clientRequest.timeOut();
invokeCallback(new StoreTimeoutException("ClientRequestExecutor timed out. Cannot complete request."),
(System.nanoTime() - startNs) / Time.NS_PER_MS);
checkin(destination, clientRequestExecutor);
}
+ @Override
public boolean isTimedOut() {
return clientRequest.isTimedOut();
}
View
3 test/unit/voldemort/client/AdminServiceBasicTest.java
@@ -17,7 +17,10 @@
package voldemort.client;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

0 comments on commit 31bc42e

Please sign in to comment.