Package org.apache.storm.tuple
Class TupleImpl
java.lang.Object
org.apache.storm.tuple.TupleImpl
- Direct Known Subclasses:
ClojureTuple
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this tuple contains the specified name of the field.boolean
int
fieldIndex
(String field) Returns the position of the specified field in this tuple.long
byte[]
getBinary
(int i) Returns the byte array at position i in the tuple.byte[]
getBinaryByField
(String field) Gets the Byte array field with a specific name.getBoolean
(int i) Returns the Boolean at position i in the tuple.getBooleanByField
(String field) Gets the Boolean field with a specific name.getByte
(int i) Returns the Byte at position i in the tuple.getByteByField
(String field) Gets the Byte field with a specific name.Gets the topology context associated with the tuple.getDouble
(int i) Returns the Double at position i in the tuple.getDoubleByField
(String field) Gets the Double field with a specific name.Gets the names of the fields in this tuple.getFloat
(int i) Returns the Float at position i in the tuple.getFloatByField
(String field) Gets the Float field with a specific name.getInteger
(int i) Returns the Integer at position i in the tuple.getIntegerByField
(String field) Gets the Integer field with a specific name.getLong
(int i) Returns the Long at position i in the tuple.getLongByField
(String field) Gets the Long field with a specific name.Gets the message id that associated with this tuple.getShort
(int i) Returns the Short at position i in the tuple.getShortByField
(String field) Gets the Short field with a specific name.Gets the id of the component that created this tuple.Returns the global stream id (component + stream) of this tuple.Gets the id of the stream that this tuple was emitted to.int
Gets the id of the task that created this tuple.getString
(int i) Returns the String at position i in the tuple.getStringByField
(String field) Gets the String field with a specific name.getValue
(int i) Gets the field at position i in the tuple.getValueByField
(String field) Gets the field with a specific name.Gets all the values in this tuple.int
hashCode()
Returns a subset of the tuple based on the fields selector.void
setExecuteSampleStartTime
(long ms) void
setProcessSampleStartTime
(long ms) int
size()
Returns the number of fields in this tuple.toString()
void
updateAckVal
(long val)
-
Constructor Details
-
TupleImpl
-
TupleImpl
-
TupleImpl
public TupleImpl(GeneralTopologyContext context, List<Object> values, String srcComponent, int taskId, String streamId)
-
-
Method Details
-
getProcessSampleStartTime
-
setProcessSampleStartTime
public void setProcessSampleStartTime(long ms) -
getExecuteSampleStartTime
-
setExecuteSampleStartTime
public void setExecuteSampleStartTime(long ms) -
updateAckVal
public void updateAckVal(long val) -
getAckVal
public long getAckVal() -
size
public int size()Description copied from interface:ITuple
Returns the number of fields in this tuple. -
fieldIndex
Description copied from interface:ITuple
Returns the position of the specified field in this tuple.- Specified by:
fieldIndex
in interfaceITuple
-
contains
Description copied from interface:ITuple
Returns true if this tuple contains the specified name of the field. -
getValue
Description copied from interface:ITuple
Gets the field at position i in the tuple. Returns object since tuples are dynamically typed. -
getString
Description copied from interface:ITuple
Returns the String at position i in the tuple. -
getInteger
Description copied from interface:ITuple
Returns the Integer at position i in the tuple.- Specified by:
getInteger
in interfaceITuple
-
getLong
Description copied from interface:ITuple
Returns the Long at position i in the tuple. -
getBoolean
Description copied from interface:ITuple
Returns the Boolean at position i in the tuple.- Specified by:
getBoolean
in interfaceITuple
-
getShort
Description copied from interface:ITuple
Returns the Short at position i in the tuple. -
getByte
Description copied from interface:ITuple
Returns the Byte at position i in the tuple. -
getDouble
Description copied from interface:ITuple
Returns the Double at position i in the tuple. -
getFloat
Description copied from interface:ITuple
Returns the Float at position i in the tuple. -
getBinary
public byte[] getBinary(int i) Description copied from interface:ITuple
Returns the byte array at position i in the tuple. -
getValueByField
Description copied from interface:ITuple
Gets the field with a specific name. Returns object since tuples are dynamically typed.- Specified by:
getValueByField
in interfaceITuple
-
getStringByField
Description copied from interface:ITuple
Gets the String field with a specific name.- Specified by:
getStringByField
in interfaceITuple
-
getIntegerByField
Description copied from interface:ITuple
Gets the Integer field with a specific name.- Specified by:
getIntegerByField
in interfaceITuple
-
getLongByField
Description copied from interface:ITuple
Gets the Long field with a specific name.- Specified by:
getLongByField
in interfaceITuple
-
getBooleanByField
Description copied from interface:ITuple
Gets the Boolean field with a specific name.- Specified by:
getBooleanByField
in interfaceITuple
-
getShortByField
Description copied from interface:ITuple
Gets the Short field with a specific name.- Specified by:
getShortByField
in interfaceITuple
-
getByteByField
Description copied from interface:ITuple
Gets the Byte field with a specific name.- Specified by:
getByteByField
in interfaceITuple
-
getDoubleByField
Description copied from interface:ITuple
Gets the Double field with a specific name.- Specified by:
getDoubleByField
in interfaceITuple
-
getFloatByField
Description copied from interface:ITuple
Gets the Float field with a specific name.- Specified by:
getFloatByField
in interfaceITuple
-
getBinaryByField
Description copied from interface:ITuple
Gets the Byte array field with a specific name.- Specified by:
getBinaryByField
in interfaceITuple
-
getValues
Description copied from interface:ITuple
Gets all the values in this tuple. -
getFields
Description copied from interface:ITuple
Gets the names of the fields in this tuple. -
select
Description copied from interface:ITuple
Returns a subset of the tuple based on the fields selector. -
getSourceGlobalStreamId
Description copied from interface:Tuple
Returns the global stream id (component + stream) of this tuple.- Specified by:
getSourceGlobalStreamId
in interfaceTuple
-
getSourceComponent
Description copied from interface:Tuple
Gets the id of the component that created this tuple.- Specified by:
getSourceComponent
in interfaceTuple
-
getSourceTask
public int getSourceTask()Description copied from interface:Tuple
Gets the id of the task that created this tuple.- Specified by:
getSourceTask
in interfaceTuple
-
getSourceStreamId
Description copied from interface:Tuple
Gets the id of the stream that this tuple was emitted to.- Specified by:
getSourceStreamId
in interfaceTuple
-
getMessageId
Description copied from interface:Tuple
Gets the message id that associated with this tuple.- Specified by:
getMessageId
in interfaceTuple
-
getContext
Description copied from interface:Tuple
Gets the topology context associated with the tuple.- Specified by:
getContext
in interfaceTuple
-
toString
-
equals
-
hashCode
public int hashCode()
-