/** * Returns whether this {@link NestedMapsStateTable} is empty. * * @return {@code true} if this {@link NestedMapsStateTable} has no elements, {@code false} * otherwise. * @see #size() */ public boolean isEmpty() { return size() == 0; }
/** * Returns whether this {@link StateTable} is empty. * * @return {@code true} if this {@link StateTable} has no elements, {@code false} * otherwise. * @see #size() */ public boolean isEmpty() { return size() == 0; }
/** * Returns whether this {@link StateTable} is empty. * * @return {@code true} if this {@link StateTable} has no elements, {@code false} * otherwise. * @see #size() */ public boolean isEmpty() { return size() == 0; }
/** * Returns whether this {@link NestedMapsStateTable} is empty. * * @return {@code true} if this {@link NestedMapsStateTable} has no elements, {@code false} * otherwise. * @see #size() */ public boolean isEmpty() { return size() == 0; }
/** * Returns the total number of state entries across all keys/namespaces. */ @VisibleForTesting @SuppressWarnings("unchecked") public int numStateEntries() { int sum = 0; for (StateTable<K, ?, ?> stateTable : stateTables.values()) { sum += stateTable.size(); } return sum; }
/** * Returns the total number of state entries across all keys/namespaces. */ @VisibleForTesting @SuppressWarnings("unchecked") @Override public int numKeyValueStateEntries() { int sum = 0; for (StateSnapshotRestore state : registeredKVStates.values()) { sum += ((StateTable<?, ?, ?>) state).size(); } return sum; }
/** * Returns the total number of state entries across all keys/namespaces. */ @VisibleForTesting @SuppressWarnings("unchecked") @Override public int numKeyValueStateEntries() { int sum = 0; for (StateSnapshotRestore state : registeredKVStates.values()) { sum += ((StateTable<?, ?, ?>) state).size(); } return sum; }
/** * Returns the total number of state entries across all keys/namespaces. */ @VisibleForTesting @SuppressWarnings("unchecked") @Override public int numStateEntries() { int sum = 0; for (StateTable<K, ?, ?> stateTable : stateTables.values()) { sum += stateTable.size(); } return sum; }