/** * org.apache.druid.indexing.common.task.Task representation for clients */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes(value = { @Type(name = "append", value = ClientAppendQuery.class), @Type(name = "merge", value = ClientMergeQuery.class), @Type(name = "kill", value = ClientKillQuery.class), @Type(name = "compact", value = ClientCompactQuery.class) }) public interface ClientQuery { String getType(); String getDataSource(); }
@JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @Type(value = ExceptionInjection.class, name = "exception"), @Type(value = CountDownLatchInjectionImpl.class, name = "latch"), @Type(value = PauseInjection.class, name = "pause")}) public static abstract class InjectionMixIn { }
/** * Interface that provides the info needed to create a new table. A storage engine * which supports creating new tables, should implement this interface. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property="type") @JsonSubTypes({ // TODO: hack until we merge "common" and "java-exec" modules (DRILL-507). @Type(name = "filesystem", value = FileSystemCreateTableEntry.class) }) public interface CreateTableEntry { Writer getWriter(PhysicalOperator child) throws IOException; List<String> getPartitionColumns(); }
@JsonSubTypes.Type(value = StrokeFilter.class) public class StrokeFilter extends Filter { /** * */ private static final long serialVersionUID = 2027201370278979033L; @Override public String toString() { String comp = getComparisonType().toString(); return comp + "_" + (getElements().contains("") ? "ANY" : String.join(",", getElements())); } }
/** * Interface that provides the info needed to create a new table. A storage engine * which supports creating new tables, should implement this interface. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property="type") @JsonSubTypes({ // TODO: hack until we merge "common" and "java-exec" modules (DRILL-507). @Type(name = "filesystem", value = FileSystemCreateTableEntry.class), @Type(name = "generic", value = GenericCreateTableEntry.class) }) public interface CreateTableEntry { Writer getWriter(PhysicalOperator child) throws IOException; WriterOptions getOptions(); }
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "kind") @JsonSubTypes({ @Type(value = ActionType.class, name = TypeKind.CODE_ACTION), @Type(value = AnyType.class, name = TypeKind.CODE_ANY), @Type(value = BinaryType.class, name = TypeKind.CODE_BINARY), @Type(value = BooleanType.class, name = TypeKind.CODE_BOOLEAN), @Type(value = IntegerType.class, name = TypeKind.CODE_INTEGER), @Type(value = ListType.class, name = TypeKind.CODE_LIST), @Type(value = MapType.class, name = TypeKind.CODE_MAP), @Type(value = NumberType.class, name = TypeKind.CODE_NUMBER), @Type(value = ObjectType.class, name = TypeKind.CODE_OBJECT), @Type(value = StringType.class, name = TypeKind.CODE_STRING), @Type(value = VoidType.class, name = TypeKind.CODE_VOID) }) public abstract class RestType { }
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes({ @Type(value = NoneMirrorCredential.class, name = "none"), @Type(value = PasswordMirrorCredential.class, name = "password"), @Type(value = PublicKeyMirrorCredential.class, name = "public_key") }) public interface MirrorCredential { MirrorCredential FALLBACK = new NoneMirrorCredential(null, Collections.singleton(Pattern.compile("^.*$"))); Optional<String> id(); Set<Pattern> hostnamePatterns(); boolean matches(URI uri); }
/** * Matthew Horridge * Stanford Center for Biomedical Informatics Research * 11 Jun 2018 */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "match") @JsonSubTypes({ @Type(IriEqualsCriteria.class), @Type(IriHasAnnotationCriteria.class) }) public interface IriCriteria extends AnnotationValueCriteria { }
@JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @Type(value = ExceptionInjection.class, name = "exception"), @Type(value = CountDownLatchInjectionImpl.class, name = "latch"), @Type(value = PauseInjection.class, name = "pause")}) public static abstract class InjectionMixIn { }
@Type(value = DurationReportResultDto.class) }) public abstract class ReportResultDto {
@Type(value = DurationReportResultDto.class) }) public abstract class ReportResultDto {
@JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeInfo(use = Id.MINIMAL_CLASS, include = As.PROPERTY, property = "@class", defaultImpl = SingularityTaskShellCommandRequest.class) @JsonSubTypes({ @Type(value = SingularityTaskShellCommandRequest.class, name = "SHELL_COMMAND"), @Type(value = SingularityTaskDestroyFrameworkMessage.class, name = "TASK_KILL") }) @Schema( subTypes = { SingularityTaskShellCommandRequest.class, SingularityTaskDestroyFrameworkMessage.class } ) public abstract class SingularityFrameworkMessage { public abstract SingularityTaskId getTaskId(); }
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") @JsonSubTypes({ @Type(value = ImmutableMetricCondition.class, name = "metric"), @Type(value = ImmutableSyntheticMonitorCondition.class, name = "synthetic-monitor"), @Type(value = ImmutableHeartbeatCondition.class, name = "heartbeat")}) interface AlertCondition {}
@JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type") @JsonSubTypes({ @Type(value = HumanClass.class, name = "human"), @Type(value = PetClass.class, name = "pet") }) public class AnimalClass { String type; String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } }
@JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type") @JsonSubTypes({ @Type(value = Human.class, name = "human"), @Type(value = Pet.class, name = "pet") }) public interface Animal { String getName(); void setName(String name); String getType(); void setType(String type); }