|
| 1 | +/* |
| 2 | + * Licensed to Elastic Search and Shay Banon under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. Elastic Search licenses this |
| 6 | + * file to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +package org.elasticsearch.index.cache.field.data.resident; |
| 21 | + |
| 22 | +import org.elasticsearch.common.inject.Inject; |
| 23 | +import org.elasticsearch.common.settings.Settings; |
| 24 | +import org.elasticsearch.index.Index; |
| 25 | +import org.elasticsearch.index.cache.field.data.support.AbstractConcurrentMapFieldDataCache; |
| 26 | +import org.elasticsearch.index.field.data.FieldData; |
| 27 | +import org.elasticsearch.index.settings.IndexSettings; |
| 28 | + |
| 29 | +import java.util.concurrent.ConcurrentHashMap; |
| 30 | +import java.util.concurrent.ConcurrentMap; |
| 31 | + |
| 32 | +/** |
| 33 | + * @author kimchy (shay.banon) |
| 34 | + */ |
| 35 | +public class ResidentFieldDataCache extends AbstractConcurrentMapFieldDataCache { |
| 36 | + |
| 37 | + @Inject public ResidentFieldDataCache(Index index, @IndexSettings Settings indexSettings) { |
| 38 | + super(index, indexSettings); |
| 39 | + } |
| 40 | + |
| 41 | + @Override protected ConcurrentMap<String, FieldData> buildFieldDataMap() { |
| 42 | + return new ConcurrentHashMap<String, FieldData>(); |
| 43 | + } |
| 44 | + |
| 45 | + @Override public String type() { |
| 46 | + return "resident"; |
| 47 | + } |
| 48 | +} |
0 commit comments