3923681125937acb17cafcc7e267e22c3f7db2c3
[mdsal.git] / dom / mdsal-dom-inmemory-datastore / src / main / java / org / opendaylight / mdsal / dom / store / inmemory / ChildShardContext.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.mdsal.dom.store.inmemory;
10
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
13
14 final class ChildShardContext {
15     private final WriteableDOMDataTreeShard shard;
16     private final DOMDataTreeIdentifier prefix;
17
18     ChildShardContext(final DOMDataTreeIdentifier prefix, final WriteableDOMDataTreeShard shard) {
19         this.prefix = Preconditions.checkNotNull(prefix);
20         this.shard = Preconditions.checkNotNull(shard);
21     }
22
23     WriteableDOMDataTreeShard getShard() {
24         return shard;
25     }
26
27     DOMDataTreeIdentifier getPrefix() {
28         return prefix;
29     }
30 }