public interface ApiVersionedAction<T>
run(AnywhereConnector, ApiVersionedAction) method
are used to perform - and possibly retry - an action that supports multiple
FssApiVersions.| Modifier and Type | Method and Description |
|---|---|
static <T> T |
run(AnywhereConnector conn,
ApiVersionedAction<T> action)
Performs the specified action with the specified
AnywhereConnector's current API version. |
T |
run(FssApiVersion apiVersion)
Perform the action, using the specified apiVersion.
|
T run(FssApiVersion apiVersion) throws java.io.IOException, AnywhereException
apiVersion - the FssApiVersion that should be used when
executing the commandjava.io.IOExceptionAnywhereExceptionstatic <T> T run(AnywhereConnector conn, ApiVersionedAction<T> action) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
AnywhereConnector's current API version. If that fails due to
an AwUnsupportedApiVersionException, then if
possible, it retries the action with the new (but different)
AnywhereConnector's current API version.conn - the AnywhereConnector that will be used by the
action, and that holds the FssApiVersion to
useaction - the action to perform. This action should use the specified
AnywhereConnector.run(com.hds.hcpaw.fss.api.version.FssApiVersion) on
the specified action. If the action initially throws an
AwUnsupportedApiVersionException and the
action is retried, then the result of the second call to
run(com.hds.hcpaw.fss.api.version.FssApiVersion) is returned. If the action
cannot be retried or any other exception is thrown from the initial call to
run(com.hds.hcpaw.fss.api.version.FssApiVersion), then the initial exception
is thrown. If the action is retried, then any exception thrown from that call is
thrown.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionAnywhereConnector.getLatestCommonApiVersion()