private void updateTimestampOfExistingEventToPreventExpiry(final E eventId, long newTimestamp) { eventIdStore.put(eventId, newTimestamp, newTimestamp); }
private void rememberNewEvent(final E eventId, long timestamp) { eventIdStore.put(eventId, timestamp, timestamp); }
@Override public void put(final Bytes key, final byte[] value, final long windowStartTimestamp) { bytesStore.put(key, value, windowStartTimestamp); changeLogger.logChange(WindowKeySchema.toStoreKeyBinary(key, windowStartTimestamp, maybeUpdateSeqnumForDups()), value); }
@Override public void put(final K key, final V value, final long windowStartTimestamp) { final long startNs = time.nanoseconds(); try { inner.put(keyBytes(key), serdes.rawValue(value), windowStartTimestamp); } catch (final ProcessorStateException e) { final String message = String.format(e.getMessage(), key, value); throw new ProcessorStateException(message, e); } finally { metrics.recordLatency(this.putTime, startNs, time.nanoseconds()); } }
@Override public void apply(final List<ThreadCache.DirtyEntry> entries) { for (final ThreadCache.DirtyEntry entry : entries) { final byte[] binaryWindowKey = cacheFunction.key(entry.key()).get(); final long timestamp = WindowKeySchema.extractStoreTimestamp(binaryWindowKey); final Windowed<K> windowedKey = WindowKeySchema.fromStoreKey(binaryWindowKey, windowSize, serdes); final Bytes key = Bytes.wrap(WindowKeySchema.extractStoreKeyBytes(binaryWindowKey)); maybeForward(entry, key, windowedKey, (InternalProcessorContext) context); underlying.put(key, entry.newValue(), timestamp); } } });