@ThriftStruct public final class PrestoThriftServiceException extends Exception { private final boolean retryable; @ThriftConstructor public PrestoThriftServiceException(String message, boolean retryable) { super(message); this.retryable = retryable; } @Override @ThriftField(1) public String getMessage() { return super.getMessage(); } @ThriftField(2) public boolean isRetryable() { return retryable; } }
@Override protected String extractName() { ThriftStruct annotation = getStructClass().getAnnotation(ThriftStruct.class); if (annotation == null) { return getStructClass().getSimpleName(); } else if (!annotation.value().isEmpty()) { return annotation.value(); } else { return getStructClass().getSimpleName(); } }
@Override protected Map<String, String> extractStructIdlAnnotations() { ThriftStruct annotation = getStructClass().getAnnotation(ThriftStruct.class); if (annotation == null) { return ImmutableMap.of(); } else { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); for (ThriftIdlAnnotation idlAnnotation : annotation.idlAnnotations()) { builder.put(idlAnnotation.key(), idlAnnotation.value()); } return builder.build(); } }
@ThriftStruct public final class PrestoThriftNullableTableMetadata
@ThriftStruct public final class PrestoThriftNullableToken
@ThriftStruct public final class PrestoThriftNullableColumnSet
@ThriftStruct public final class PrestoThriftNullableSchemaName
@ThriftStruct public final class PrestoThriftDomain
@ThriftStruct public final class PrestoThriftAllOrNoneValueSet
@ThriftStruct public final class PrestoThriftTupleDomain
@ThriftStruct public final class PrestoThriftSplitBatch
@ThriftStruct public static final class PrestoThriftMarker
@ThriftStruct public static final class PrestoThriftRange
@ThriftStruct public final class PrestoThriftHostAddress
@ThriftStruct public final class PrestoThriftSchemaTableName
@ThriftStruct public final class PrestoThriftEquatableValueSet
@ThriftStruct public final class PrestoThriftId
@ThriftStruct public final class PrestoThriftSplit
@ThriftStruct public final class PrestoThriftTableMetadata