private long getTimestamp(StreamEvent streamEvent) {
        long timestamp;
        if (streamEvent.getType() == ComplexEvent.Type.CURRENT) {
            timestamp = (long) timestampExpressionExecutor.execute(streamEvent);
        } else {
            timestamp = streamEvent.getTimestamp();
        }
        return timestamp;
    }
Incremental Executor implementation class for Persisted Aggregation
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/persistedaggregation/PersistedIncrementalExecutor.java