mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] remove unused InMemoryMap
Was introduced ind401d0dfor usage in log indexes when persistence map could not be created for some reason. Stopped being used in32e141e: when phm can not be created then indexes could not be created.
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.vcs.log.data;
|
||||
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.io.PersistentMap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class InMemoryMap<K, V> implements PersistentMap<K, V> {
|
||||
private final Map<K, V> myMap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public V get(K key) throws IOException {
|
||||
return myMap.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(K key, V value) throws IOException {
|
||||
myMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processKeys(Processor<K> processor) throws IOException {
|
||||
for (K key : myMap.keySet()) {
|
||||
if (!processor.process(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDirty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void force() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() throws IOException {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user