public class LazyInPlaceTuple extends TupleImpl implements IResourceTuple
Only one is kept and updated on the fly. This means there is a concurrency issue between punchlets accessing the tuple and the new values being loaded.
ancestor, content
Constructor and Description |
---|
LazyInPlaceTuple() |
Modifier and Type | Method and Description |
---|---|
void |
addKeyValue(String k,
Tuple item)
This method is called from the thread that fetch a remote resource
In all cases an onStart was fired before, and once done an
onEnd will follow.
|
Tuple |
get(String key)
Retrieve a child.
|
Tuple |
onEnd()
This signal tells you the loading of a remote resource is now terminated.
|
void |
onStart()
This signal is sent right before a new set of values will be uploaded.
|
Tuple |
set(Object value)
Set a new value to a tuple
|
int |
size()
Return the number of fields in this tuple.
|
add, append, asArray, asGeoShape, asSet, compareTo, compareTo, contains, decodeBase64, dtoPunchLeafValue, dump, duplicate, elements, empty, encodeBase64, equals, equalsOneOf, exists, fromEscapedJson, getByKey, getElement, getElement, getEntries, getIterator, getSingleChild, getValue, getValues, isEmpty, isLeaf, leafAsString, merge, mergeWith, putAll, remove, remove, removeElement, replaceAllKeys, replaceAllKeyValues, select, set, setLeaf, skip, splitAsTupleArray, toAsciiJson, toEscapedJson, toFlat, toJson, toMap, toString, up
asBoolean, asBytes, asCollection, asDouble, asDoubleArray, asFloat, asInt, asLong, asLongArray, asString, asString, asStringArray, attach, concat, containsOneOf, containsOneOf, cutPrefix, cutSuffix, endsWith, get, get, get, getAttachment, getCreateTrie, getDeep, getDeepEs, getKeys, getType, hasKey, indexOf, indexOf, indexOf, indexOf, isArray, isBooleanLeaf, isBytesLeaf, isDoubleLeaf, isEquals, isLongLeaf, isRoot, isSet, isStringLeaf, isTuple, length, matches, remove, replace, replaceAll, replaceAllValues, replaceFirst, split, startsWith, substring, substring, toArray, toLowerCase, toUpperCase, trim, tryBoolean, tryBoolean, tryBytes, tryBytes, tryDouble, tryDouble, tryIp, tryIp, tryIpv4, tryIpv4, tryIpv6, tryIpv6, tryLong, tryLong
public void addKeyValue(String k, Tuple item)
addKeyValue
in interface IResourceTuple
public void onStart()
IResourceTuple
onStart
in interface IResourceTuple
public Tuple onEnd()
IResourceTuple
You must return the underlying Tuple resource object.
onEnd
in interface IResourceTuple
public Tuple get(String key)
TupleImpl
tuple.get("a").get("b|).get("c").set("hello");Without 'a' being there.
public Tuple set(Object value)
TupleImpl
public int size()
Tuple
Copyright © 2023. All rights reserved.