Commit 7eb313c3 authored by Tobias Meuser's avatar Tobias Meuser Committed by Jose Ignacio Monreal Bailey
Browse files

Added PointInformation to support non-vehicular scenarios

parent f45d4709
...@@ -64,6 +64,15 @@ public class DefaultCachingComponent implements CachingComponent, ConnectivityLi ...@@ -64,6 +64,15 @@ public class DefaultCachingComponent implements CachingComponent, ConnectivityLi
return null; return null;
} }
@Override
public <T> boolean containsEntry(T pCacheEntry) {
if (_cache.containsKey(pCacheEntry)) {
List<? extends Object> cacheEntries = _cache.get(pCacheEntry);
return cacheEntries.contains(pCacheEntry);
}
return false;
}
@Override @Override
public <T> void storeCacheEntry(T pCacheEntry) { public <T> void storeCacheEntry(T pCacheEntry) {
if (!_cache.containsKey(pCacheEntry.getClass())) { if (!_cache.containsKey(pCacheEntry.getClass())) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
package de.tud.kom.p2psim.impl.vehicular.caching.invalidation; package de.tud.kom.p2psim.impl.vehicular.caching.invalidation;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.invalidation.CacheInvalidationStrategy; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.invalidation.CacheInvalidationStrategy;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.VehicularPointInformation; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
public class DefaultCacheInvalidationStrategy implements CacheInvalidationStrategy { public class DefaultCacheInvalidationStrategy implements CacheInvalidationStrategy {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
package de.tud.kom.p2psim.impl.vehicular.caching.replacement; package de.tud.kom.p2psim.impl.vehicular.caching.replacement;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.replacement.CacheReplacementStrategy; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.caching.replacement.CacheReplacementStrategy;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.VehicularPointInformation; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
public class DefaultCacheReplacementStrategy implements CacheReplacementStrategy { public class DefaultCacheReplacementStrategy implements CacheReplacementStrategy {
......
...@@ -28,8 +28,8 @@ import java.util.Queue; ...@@ -28,8 +28,8 @@ import java.util.Queue;
import de.tudarmstadt.maki.simonstrator.api.Host; import de.tudarmstadt.maki.simonstrator.api.Host;
import de.tudarmstadt.maki.simonstrator.api.Time; import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.VehicleInformationComponent; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.VehicleInformationComponent;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.VehicularPointInformation;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.EventRelevanceCalculationComponent; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.EventRelevanceCalculationComponent;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance.VehicularPointInformation;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge; import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge;
public class PredictionBasedEventRelevanceCalculationComponent implements EventRelevanceCalculationComponent { public class PredictionBasedEventRelevanceCalculationComponent implements EventRelevanceCalculationComponent {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment