Package playn.core
Interface Storage.Batch
- All Known Implementing Classes:
BatchImpl
- Enclosing interface:
Storage
public static interface Storage.Batch
Represents a batch of edits to be applied to storage in one transaction. Individual edits are
expensive on some platforms, and this batch interface allows multiple edits to be applied
substantially more efficiently (more than an order of magnitude) on those platforms. If you're
going to make hundreds or thousands of changes at once, use this mechanism.
-
Method Summary
-
Method Details
-
setItem
Adds an update to the batch. -
removeItem
Adds an deletion to the batch. -
commit
void commit()Commits the batch, applying all queued changes. Attempts to callsetItem(java.lang.String, java.lang.String)
orremoveItem(java.lang.String)
after a call to this method will fail.
-