blob: 268c9095cd8484ee4c5415fd2016ce2e52eb8c2d [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 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070022 TransactionContextBuilder withPartitionsDisabled();
Ayaka Koshibe3a321562015-04-29 13:24:07 -070023
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 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070031 TransactionContext build();
Ayaka Koshibe3a321562015-04-29 13:24:07 -070032}