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() |
public static final String SINGLE_VALUE_KEY
public abstract boolean hasError()
public abstract long cacheTTL()
public boolean isEmpty()
public boolean hasTTL()
public static LookupResult empty()
public static LookupResult withError()
public static LookupResult withError(long errorTTL)
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.Builder addDefaults(LookupDefaultSingleValue singleValue, LookupDefaultMultiValue multiValue)
public static LookupResult createFromJSON(Object singleValue, Map<Object,Object> multiValue, List<String> stringListValue, boolean hasError, long cacheTTL)
public static LookupResult.Builder withoutTTL()
public static LookupResult.Builder builder()
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.