Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package stream.data;
 
 import stream.Data;

Author(s):
chris
@Description(group = "Streams.Transformations.Annotations")
public class AddTimestamp implements Processor {
	String key = "@timestamp";

Returns:
the key
	public String getKey() {
		return ;
	}

Parameters:
key the key to set
	@Parameter(description = "The key of the timestamp attribute to add")
	public void setKey(String key) {
		this. = key;
	}

	public Data process(Data input) {
		if ( != null) {
			input.put(, System.currentTimeMillis());
		}
		return input;
	}
New to GrepCode? Check out our FAQ X