blob: 5db1704976000c8263bd216b0f1b778977053214 [file] [log] [blame]
Madan Jampania89f8f92015-04-01 14:39:54 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.store.service;
17
18/**
19 * Metadata information for a consistent map.
20 */
21public class MapInfo {
22 private final String name;
23 private final int size;
24
25 public MapInfo(String name, int size) {
26 this.name = name;
27 this.size = size;
28 }
29
30 /**
31 * Returns the name of the map.
32 *
33 * @return map name
34 */
35 public String name() {
36 return name;
37 }
38
39 /**
40 * Returns the number of entries in the map.
41 *
42 * @return map size
43 */
44 public int size() {
45 return size;
46 }
47}