com.amazonaws.services.sqs.executors.CompletedFutureSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amazon-sqs-java-temporary-queues-client Show documentation
Show all versions of amazon-sqs-java-temporary-queues-client Show documentation
An Amazon SQS client that supports creating lightweight, automatically-deleted temporary queues, for use in common messaging patterns such as Request/Response. See http://aws.amazon.com/sqs.
The newest version!
package com.amazonaws.services.sqs.executors;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
public class CompletedFutureSerializer implements InvertibleFunction, String> {
private static final char NORMAL_VALUE_PREFIX = '.';
private static final char CANCELLED_PREFIX = 'C';
private static final char EXCEPTION_PREFIX = 'E';
private final InvertibleFunction resultSerializer;
private final InvertibleFunction exceptionSerializer;
public CompletedFutureSerializer(InvertibleFunction