/** * Releases a snapshot for this {@link CopyOnWriteStateTable}. This method should be called once a snapshot is no more needed, * so that the {@link CopyOnWriteStateTable} can stop considering this snapshot for copy-on-write, thus avoiding unnecessary * object creation. * * @param snapshotToRelease the snapshot to release, which was previously created by this state table. */ void releaseSnapshot(CopyOnWriteStateTableSnapshot<K, N, S> snapshotToRelease) { Preconditions.checkArgument(snapshotToRelease.isOwner(this), "Cannot release snapshot which is owned by a different state table."); releaseSnapshot(snapshotToRelease.getSnapshotVersion()); }
/** * Releases a snapshot for this {@link CopyOnWriteStateTable}. This method should be called once a snapshot is no more needed, * so that the {@link CopyOnWriteStateTable} can stop considering this snapshot for copy-on-write, thus avoiding unnecessary * object creation. * * @param snapshotToRelease the snapshot to release, which was previously created by this state table. */ void releaseSnapshot(CopyOnWriteStateTableSnapshot<K, N, S> snapshotToRelease) { Preconditions.checkArgument(snapshotToRelease.isOwner(this), "Cannot release snapshot which is owned by a different state table."); releaseSnapshot(snapshotToRelease.getSnapshotVersion()); }
/** * Releases a snapshot for this {@link CopyOnWriteStateTable}. This method should be called once a snapshot is no more needed, * so that the {@link CopyOnWriteStateTable} can stop considering this snapshot for copy-on-write, thus avoiding unnecessary * object creation. * * @param snapshotToRelease the snapshot to release, which was previously created by this state table. */ void releaseSnapshot(CopyOnWriteStateTableSnapshot<K, N, S> snapshotToRelease) { Preconditions.checkArgument(snapshotToRelease.isOwner(this), "Cannot release snapshot which is owned by a different state table."); releaseSnapshot(snapshotToRelease.getSnapshotVersion()); }
/** * Releases a snapshot for this {@link CopyOnWriteStateTable}. This method should be called once a snapshot is no more needed, * so that the {@link CopyOnWriteStateTable} can stop considering this snapshot for copy-on-write, thus avoiding unnecessary * object creation. * * @param snapshotToRelease the snapshot to release, which was previously created by this state table. */ void releaseSnapshot(CopyOnWriteStateTableSnapshot<K, N, S> snapshotToRelease) { Preconditions.checkArgument(snapshotToRelease.isOwner(this), "Cannot release snapshot which is owned by a different state table."); releaseSnapshot(snapshotToRelease.getSnapshotVersion()); }