Package org.jclouds

Interface Fallback<V>

Type Parameters:
V - the result type of the backup value
All Known Subinterfaces:
PropagateIfRetryAfter
All Known Implementing Classes:
AzureBlobFallbacks.FalseIfContainerAlreadyExists, BlobStoreFallbacks.FalseOnContainerNotFound, BlobStoreFallbacks.FalseOnKeyNotFound, BlobStoreFallbacks.NullOnContainerNotFound, BlobStoreFallbacks.NullOnKeyAlreadyExists, BlobStoreFallbacks.NullOnKeyNotFound, BlobStoreFallbacks.ThrowContainerNotFoundOn404, BlobStoreFallbacks.ThrowKeyNotFoundOn404, CloudStackFallbacks.VoidOnNotFoundOr404OrUnableToFindAccountOwner, DynECTFallbacks.FalseOn400, EC2Fallbacks.VoidOnVolumeAvailable, EmptyFloatingIPsFallback, EmptyHealthMonitorsFallback, EmptyMembersFallback, EmptyNetworksFallback, EmptyPoolsFallback, EmptyPortsFallback, EmptyRoutersFallback, EmptyRulesFallback, EmptySecurityGroupsFallback, EmptySubnetsFallback, EmptyVIPsFallback, EndpointIfAlreadyExists, Fallbacks.AbsentOn403Or404Or500, Fallbacks.EmptyFluentIterableOnNotFoundOr404, Fallbacks.EmptyIterableWithMarkerOnNotFoundOr404, Fallbacks.EmptyListOnNotFoundOr404, Fallbacks.EmptyMapOnNotFoundOr404, Fallbacks.EmptyMultimapOnNotFoundOr404, Fallbacks.EmptyPagedIterableOnNotFoundOr404, Fallbacks.EmptySetOnNotFoundOr404, Fallbacks.FalseOnNotFoundOr404, Fallbacks.FalseOnNotFoundOr422, Fallbacks.NullOnNotFoundOr404, Fallbacks.TrueOnNotFoundOr404, Fallbacks.VoidOnNotFoundOr404, FalseIfBucketAlreadyOwnedByYouOrOperationAbortedWhenBucketExists, FalseOnIllegalArgumentException, GoogleCloudStorageFallbacks.NullOnBucketAlreadyExists, GoogleComputeEngineFallbacks.NullOn400or404, HeaderToRetryAfterException, KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404, MapHttp4xxCodesToExceptions, OAuthFallbacks.AuthorizationExceptionOn4xx, S3Fallbacks.TrueOn404OrNotFoundFalseOnIllegalState, SwiftFallbacks.TrueOn404FalseOn409, TrueOn404FalseOnPathNotEmpty

@Beta public interface Fallback<V>
Provides a backup value to replace an earlier exception.
Since:
1.6
  • Method Summary

    Modifier and Type
    Method
    Description
    The exception is provided so that the Fallback implementation can conditionally determine whether to propagate the exception or to attempt to recover.
  • Method Details

    • createOrPropagate

      V createOrPropagate(Throwable t) throws Exception
      The exception is provided so that the Fallback implementation can conditionally determine whether to propagate the exception or to attempt to recover.
      Parameters:
      t - the exception that made the call fail.
      Throws:
      Exception