public abstract class LookupResult extends Object
For convenience, this class can be serialized and deserialized with Jackson (see
ObjectMapper, but we strongly recommend implementing your own
serialization and deserialization logic if you're implementing a lookup cache.
There are no guarantees about binary compatibility of this class across Graylog releases!
| Modifier and Type | Class and Description |
|---|---|
static class |
LookupResult.Builder |
| Modifier and Type | Field and Description |
|---|---|
static String |
SINGLE_VALUE_KEY |
| Constructor and Description |
|---|
LookupResult() |
| Modifier and Type | Method and Description |
|---|---|
static LookupResult.Builder |
builder() |
abstract long |
cacheTTL()
The time to live (in milliseconds) for a LookupResult instance.
|
static LookupResult |
createFromJSON(Object singleValue,
Map<Object,Object> multiValue,
long cacheTTL) |
static LookupResult |
empty() |
boolean |
isEmpty() |
static LookupResult |
multi(Boolean singleValue,
Map<Object,Object> multiValue) |
static LookupResult |
multi(CharSequence singleValue,
Map<Object,Object> multiValue) |
static LookupResult |
multi(Number singleValue,
Map<Object,Object> multiValue) |
abstract Map<Object,Object> |
multiValue() |
static LookupResult |
single(Boolean singleValue) |
static LookupResult |
single(CharSequence singleValue) |
static LookupResult |
single(Number singleValue) |
abstract Object |
singleValue() |
static LookupResult |
withDefaults(LookupDefaultSingleValue singleValue,
LookupDefaultMultiValue multiValue) |
static LookupResult.Builder |
withoutTTL() |
public static final String SINGLE_VALUE_KEY
public abstract long cacheTTL()
public boolean isEmpty()
public static LookupResult empty()
public static LookupResult single(CharSequence singleValue)
public static LookupResult single(Number singleValue)
public static LookupResult single(Boolean singleValue)
public static LookupResult multi(CharSequence singleValue, Map<Object,Object> multiValue)
public static LookupResult multi(Number singleValue, Map<Object,Object> multiValue)
public static LookupResult multi(Boolean singleValue, Map<Object,Object> multiValue)
public static LookupResult withDefaults(LookupDefaultSingleValue singleValue, LookupDefaultMultiValue multiValue)
public static LookupResult createFromJSON(Object singleValue, Map<Object,Object> multiValue, long cacheTTL)
public static LookupResult.Builder withoutTTL()
public static LookupResult.Builder builder()
Copyright © 2012–2020 Graylog, Inc.. All rights reserved.