本文整理汇总了Java中org.apache.kafka.streams.processor.ProcessorContext.getStateStore方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessorContext.getStateStore方法的具体用法?Java ProcessorContext.getStateStore怎么用?Java ProcessorContext.getStateStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.kafka.streams.processor.ProcessorContext
的用法示例。
在下文中一共展示了ProcessorContext.getStateStore方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
public void init(ProcessorContext pc) {
this.pc = pc;
this.pc.schedule(12000); //invoke punctuate every 12 seconds
this.machineToAvgCPUUsageStore = (KeyValueStore<String, Double>) pc.getStateStore(AVG_STORE_NAME);
this.machineToNumOfRecordsReadStore = (KeyValueStore<String, Integer>) pc.getStateStore(NUM_RECORDS_STORE_NAME);
PROC_LOGGER.info("Processor initialized");
}
示例2: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
store = (KeyValueStore<K, V>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
示例3: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
window = (WindowStore<K, V>) context.getStateStore(windowName);
}
示例4: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
if (queryableName != null) {
store = (KeyValueStore<K, V>) context.getStateStore(queryableName);
tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
}
示例5: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
store = (SessionStore<K, T>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
示例6: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
windowStore = (WindowStore<K, T>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(windowStore, context, new ForwardingCacheFlushListener<Windowed<K>, V>(context, sendOldValues), sendOldValues);
}
示例7: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(final ProcessorContext context) {
super.init(context);
store = (KeyValueStore<K, T>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
示例8: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
if (queryableName != null) {
store = (KeyValueStore<K, V>) context.getStateStore(queryableName);
tupleForwarder = new TupleForwarder<>(store, context,
new ForwardingCacheFlushListener<K, V>(context, sendOldValues),
sendOldValues);
}
}
示例9: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
store = (KeyValueStore<K, V>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<K, V>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
示例10: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
windowStore = (WindowStore<K, V>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(windowStore, context, new ForwardingCacheFlushListener<Windowed<K>, V>(context, sendOldValues), sendOldValues);
}
示例11: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
super.init(context);
store = (KeyValueStore<K, T>) context.getStateStore(storeName);
tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
示例12: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
public void init(ProcessorContext context) {
super.init(context);
otherWindow = (WindowStore<K, V2>) context.getStateStore(otherWindowName);
}
示例13: init
import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void init(ProcessorContext context) {
super.init(context);
store = (KeyValueStore<String, String>) context.getStateStore(storeName);
}