return index < 0 ? 0 : index;
}
private static void interceptAndInvalidate(MapServiceContext mapServiceContext, long value, Data tmpKey, String mapName) {
mapServiceContext.interceptAfterRemove(mapName, value);
final NearCacheProvider nearCacheProvider = mapServiceContext.getNearCacheProvider();
if (nearCacheProvider.isNearCacheAndInvalidationEnabled(mapName)) {
nearCacheProvider.invalidateAllNearCaches(mapName, tmpKey);
}
}