blob: 4ae6b0f961d9a1ef9e7c53690a410a38a9da9a82 [file] [log] [blame]
Ayaka Koshibe3a321562015-04-29 13:24:07 -07001package org.onosproject.store.service;
2
3/**
4 * Interface definition for a transaction context builder.
5 */
6public interface TransactionContextBuilder {
7
8 /**
9 * Disables distribution of map entries across multiple database partitions.
10 * <p>
11 * When partitioning is disabled, the returned map will have a single
12 * partition that spans the entire cluster. Furthermore, the changes made to
13 * the map are ephemeral and do not survive a full cluster restart.
14 * </p>
15 * <p>
16 * Note: By default, partitions are enabled. This feature is intended to
17 * simplify debugging.
18 * </p>
19 *
20 * @return this TransactionalContextBuilder
21 */
22 public TransactionContextBuilder withPartitionsDisabled();
23
24 /**
25 * Builds a TransactionContext based on configuration options supplied to this
26 * builder.
27 *
28 * @return a new TransactionalContext
29 * @throws java.lang.RuntimeException if a mandatory parameter is missing
30 */
31 public TransactionContext build();
32}