public abstract class AbstractResult<V> extends Object
get()
returns either the result or throws a
VaultException
if the execution completed with an error.Modifier | Constructor and Description |
---|---|
protected |
AbstractResult()
Create a
AbstractResult completed without an VaultException . |
protected |
AbstractResult(VaultException exception)
Create a
AbstractResult completed with an VaultException . |
Modifier and Type | Method and Description |
---|---|
V |
get()
Return the result or throw a
VaultException if the operation completed with
an error. |
protected abstract V |
get0() |
Exception |
getCause()
Returns the cause of the failed operation if the operation completed with an error.
|
boolean |
isSuccessful()
Returns true if and only if the batch operation was completed
successfully.
|
protected AbstractResult()
AbstractResult
completed without an VaultException
.protected AbstractResult(VaultException exception)
AbstractResult
completed with an VaultException
.exception
- must not be null.public boolean isSuccessful()
getCause()
to obtain the actual exception if the
operation completed with an error.@Nullable public Exception getCause()
@Nullable public V get()
VaultException
if the operation completed with
an error. Use isSuccessful()
to verify the success status of this result
without throwing an exception.VaultException
- if the operation completed with an error.Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.