public class Candidate extends java.lang.Object implements Hierarchical, FetchAffinityKey, EmittedItem, Fields, Metadata
FetchInput
's etc..
They are either re-emitted as Skip
's (validation failed)
or a new FetchInput
(validation passed).
Since a Candidate
can only be created from a FetchInput
,
it is always considered to be a child of the associated FetchInput
.Modifier and Type | Class and Description |
---|---|
static class |
Candidate.Builder |
static class |
Candidate.Emitter |
Modifier and Type | Method and Description |
---|---|
static Candidate.Builder |
builder(java.lang.String id) |
static Candidate.Emitter |
emitter(java.lang.String id,
java.util.function.Consumer<EmittedItem> emittedItemConsumer)
Creates a new candidate emitter
|
java.lang.String |
getAffinityKey() |
java.util.Map<java.lang.String,java.lang.Object> |
getFields() |
java.lang.String |
getId() |
long |
getLastModified() |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata() |
java.lang.String |
getParentId() |
long |
getSignature() |
java.lang.String |
getSourcePhase() |
java.lang.String |
getTargetPhase() |
boolean |
isLeafNode() |
boolean |
isTransient() |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isBranchNode
hasAffinityKey
hasFields
hasMetadata
public java.lang.String getId()
getId
in interface Identifiable
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
getMetadata
in interface Metadata
public java.util.Map<java.lang.String,java.lang.Object> getFields()
public long getLastModified()
public java.lang.String getParentId()
public java.lang.String getSourcePhase()
public java.lang.String getTargetPhase()
public long getSignature()
public boolean isTransient()
public java.lang.String getAffinityKey()
getAffinityKey
in interface FetchAffinityKey
public boolean isLeafNode()
isLeafNode
in interface Hierarchical
public static Candidate.Builder builder(java.lang.String id)
public static Candidate.Emitter emitter(java.lang.String id, java.util.function.Consumer<EmittedItem> emittedItemConsumer)
id
- idemittedItemConsumer
- emitted item consumerpublic java.lang.String toString()
toString
in class java.lang.Object