public class Error extends java.lang.Object implements EmittedItem, Metadata
Modifier and Type | Class and Description |
---|---|
static class |
Error.Builder |
static class |
Error.Emitter |
Modifier and Type | Method and Description |
---|---|
static Error.Builder |
builder(java.lang.String id)
Deprecated.
|
static Error.Builder |
builder(java.lang.String id,
java.lang.String error)
Error builder
|
static Error.Emitter |
emitter(java.lang.String id,
java.lang.String error,
java.util.function.Consumer<EmittedItem> emittedItemConsumer) |
static Error.Emitter |
emitter(java.lang.String id,
java.lang.String error,
java.util.Optional<RetryPolicy> retryProperties,
java.util.function.Consumer<EmittedItem> emittedItemConsumer)
Creates error emitter
|
java.lang.String |
getError() |
java.lang.String |
getId() |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata() |
java.util.Optional<RetryPolicy> |
getRetryProperties() |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
hasMetadata
public java.lang.String getId()
getId
in interface Identifiable
public java.lang.String getError()
public java.util.Optional<RetryPolicy> getRetryProperties()
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
getMetadata
in interface Metadata
@Deprecated public static Error.Builder builder(java.lang.String id)
builder(String, String)
id
- idpublic static Error.Builder builder(java.lang.String id, java.lang.String error)
id
- iderror
- error messagepublic static Error.Emitter emitter(java.lang.String id, java.lang.String error, java.util.Optional<RetryPolicy> retryProperties, java.util.function.Consumer<EmittedItem> emittedItemConsumer)
id
- iderror
- errorretryProperties
- Retry PropertiesemittedItemConsumer
- emitted item consumerpublic static Error.Emitter emitter(java.lang.String id, java.lang.String error, java.util.function.Consumer<EmittedItem> emittedItemConsumer)
public java.lang.String toString()
toString
in class java.lang.Object