V
- The type of the operation's result.public final class LambdaCallbackAdapter<V> extends Object implements StreamCallback<V>
Constructor and Description |
---|
LambdaCallbackAdapter(LambdaCallback<V> lambda)
Creates a new LambdaCallbackAdapter.
|
Modifier and Type | Method and Description |
---|---|
void |
callback(V result)
Called when the MongoDB operation has completed with the result of the
operation.
|
void |
done()
Called when the stream of MongoDB documents has been exhausted.
|
void |
exception(Throwable thrown)
Called when the operation fails due to an exception.
|
public LambdaCallbackAdapter(LambdaCallback<V> lambda)
lambda
- The LambdaCallback
to trigger.public void callback(V result)
Overridden to call accept(null, result)
on the wrapped LambdaCallback
.
public void done()
Overridden to call accept(null, null)
on the wrapped LambdaCallback
.
done
in interface StreamCallback<V>
public void exception(Throwable thrown)
Overridden to call accept(thrown, null)
on the wrapped LambdaCallback
.
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.