...
Code Block | ||||
---|---|---|---|---|
| ||||
/** * Return true the storage supports transactions. * * @return {@code true} if the storage supports transactions, {@code false} otherwise */ default boolean transactional() { return false; } /** * Flush and commit any cached data * <p> * For transactional state store commit applies all changes atomically. In other words, either the * entire commit will be successful or none of the changes will be applied. * <p> * For non-transactional state store this method flushes cached data. * * @param changelogOffset the offset of the changelog topic this commit corresponds to. The * offset can be null if the state store does not have a changelog * (e.g. a global store). * @code null} */ void commit(final Long changelogOffset); /** * Recover a transactional state store * <p> * If a transactional state store shut down with a crash failure, this method can either * roll back or forward uncommitted changes. In any case, this method returns the changelog * offset it rolls to. * * @param changelogOffset the checkpointed changelog offset. * @return the changelog offset after recovery. */ Long recover(final Long changelogOffset) |
The flush signature did not change, but the way it is expected to work when transactional() is true does, so I am including it here as well:
StoreSupplier
Code Block | ||
---|---|---|
| ||
/** * Return true if a call to {@link StoreSupplier#get} returns a transactional state * store. * * @return {@code true} if a call to {@link StoreSupplier#get} returns a transactional state * store, {@code false} otherwise. */ boolean transactional(); |
...