Class BKStateStoreImpl
java.lang.Object
org.apache.pulsar.functions.instance.state.BKStateStoreImpl
- All Implemented Interfaces:
AutoCloseable,ByteBufferStateStore,CounterStateStore,StateStore,DefaultStateStore
This class accumulates the state updates from one function.
currently it exposes incr operations. but we can expose other key/values operations if needed.
-
Constructor Summary
ConstructorsConstructorDescriptionBKStateStoreImpl(String tenant, String namespace, String name, org.apache.bookkeeper.api.kv.Table<io.netty.buffer.ByteBuf, io.netty.buffer.ByteBuf> table) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddeleteAsync(String key) fqsn()longgetCounter(String key) getCounterAsync(String key) getStateValue(String key) getStateValueAsync(String key) voidincrCounter(String key, long amount) incrCounterAsync(String key, long amount) voidinit(StateStoreContext ctx) name()voidput(String key, ByteBuffer value) putAsync(String key, ByteBuffer value) tenant()
-
Constructor Details
-
BKStateStoreImpl
-
-
Method Details
-
tenant
- Specified by:
tenantin interfaceStateStore
-
namespace
- Specified by:
namespacein interfaceStateStore
-
name
- Specified by:
namein interfaceStateStore
-
fqsn
- Specified by:
fqsnin interfaceStateStore
-
init
- Specified by:
initin interfaceStateStore
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStateStore
-
incrCounterAsync
- Specified by:
incrCounterAsyncin interfaceCounterStateStore
-
incrCounter
- Specified by:
incrCounterin interfaceCounterStateStore
-
getCounterAsync
- Specified by:
getCounterAsyncin interfaceCounterStateStore
-
getCounter
- Specified by:
getCounterin interfaceCounterStateStore
-
putAsync
- Specified by:
putAsyncin interfaceByteBufferStateStore
-
put
- Specified by:
putin interfaceByteBufferStateStore
-
deleteAsync
- Specified by:
deleteAsyncin interfaceByteBufferStateStore
-
delete
- Specified by:
deletein interfaceByteBufferStateStore
-
getAsync
- Specified by:
getAsyncin interfaceByteBufferStateStore
-
get
- Specified by:
getin interfaceByteBufferStateStore
-
getStateValue
- Specified by:
getStateValuein interfaceByteBufferStateStore
-
getStateValueAsync
- Specified by:
getStateValueAsyncin interfaceByteBufferStateStore
-