BatchUpdates class abstract

BatchUpdates holds a collection of updates to apply atomically to a DB.

The updates are applied in the order in which they are added to the BatchUpdates. For example, the value of key will be "v3" after the following batch is written:

batch.Put("key", "v1"); batch.Delete("key"); batch.Put("key", "v2"); batch.Put("key", "v3");

Multiple threads can invoke const methods on a BatchUpdates without external synchronization, but if any of the threads may call a non-const method, all threads accessing the same BatchUpdates must use external synchronization.

Constructors

BatchUpdates()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ptr Pointer<NativeType>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

append(BatchUpdates updates) → void
Copies the operations in "source" to this batch. throws StateError if method was called after BatchUpdates.dispose
clear() → void
Clear all updates buffered in this batch.
delete(RawData key) → void
If the database contains a mapping for key, erase it. Else do nothing. throws StateError if method was called after BatchUpdates.dispose
dispose() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(RawData key, RawData value) → void
Store the mapping "key->value" in the database. throws StateError if method was called after BatchUpdates.dispose
toString() String
A string representation of this object.
inherited

Operators

operator +(BatchUpdates obj) → void
operator ==(Object other) bool
The equality operator.
inherited