View Javadoc
1   /*
2    * Copyright 2016 The Lannister Project
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   */
16  package net.anyflow.lannister.cluster;
17  
18  import java.util.Set;
19  
20  import com.fasterxml.jackson.databind.annotation.JsonSerialize;
21  
22  import net.anyflow.lannister.serialization.MapSerializer;
23  
24  @JsonSerialize(using = MapSerializer.class)
25  public interface Map<K, V> {
26  	void put(K key, V value);
27  
28  	V get(K key);
29  
30  	V remove(K key);
31  
32  	Set<K> keySet();
33  
34  	void dispose();
35  
36  	int size();
37  
38  	boolean containsKey(K key);
39  }