DATACASS-287 - Call QueryForObjectListener for absent singular responses.

QueryForObjectListener is now called passing null for absent responses when querying for one single object.
This commit is contained in:
Mark Paluch
2016-06-03 14:20:06 +02:00
committed by John Blum
parent 347b008b5c
commit b14956cb67
4 changed files with 66 additions and 5 deletions

View File

@@ -22,19 +22,21 @@ import org.springframework.cassandra.support.TestListener;
* @author Matthew T. Adams
* @author David Webb
*/
class ObjectListener<T> extends TestListener implements QueryForObjectListener<T> {
public class ObjectListener<T> extends TestListener implements QueryForObjectListener<T> {
T result;
Exception exception;
public volatile T result;
public volatile Exception exception;
@Override
public void onQueryComplete(T result) {
this.result = result;
countDown();
}
@Override
public void onException(Exception x) {
this.exception = x;
countDown();
}