mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Cut blank lines
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package net.openhft.chronicle.hash.impl;
|
||||
|
||||
|
||||
import net.openhft.chronicle.core.Maths;
|
||||
|
||||
import static net.openhft.chronicle.algo.MemoryUnit.BITS;
|
||||
@@ -35,7 +34,6 @@ public abstract class CompactOffHeapLinearHashTable {
|
||||
*/
|
||||
public static final double MAX_LOAD_FACTOR = 0.8;
|
||||
|
||||
|
||||
public static int valueBits(long actualChunksPerSegment) {
|
||||
return 64 - Long.numberOfLeadingZeros(actualChunksPerSegment - 1L);
|
||||
}
|
||||
@@ -77,7 +75,6 @@ public abstract class CompactOffHeapLinearHashTable {
|
||||
public static final long UNSET_KEY = 0L;
|
||||
public static final long UNSET_ENTRY = 0L;
|
||||
|
||||
|
||||
private final long capacityMask;
|
||||
final long capacityMask2;
|
||||
private final int keyBits;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class EntryKeyBytesData<K> extends AbstractData<K> {
|
||||
@StageRef HashEntryStages<K> entry;
|
||||
@StageRef CheckOnEachPublicOperation checkOnEachPublicOperation;
|
||||
|
||||
|
||||
@Stage("CachedEntryKey") private K cachedEntryKey;
|
||||
@Stage("CachedEntryKey") private boolean cachedEntryKeyRead = false;
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import static net.openhft.chronicle.algo.bytes.Access.checkedBytesStoreAccess;
|
||||
import static net.openhft.chronicle.algo.bytes.Access.nativeAccess;
|
||||
|
||||
|
||||
@Staged
|
||||
public abstract class HashEntryStages<K> implements HashEntry<K>, ChecksumEntry {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import static net.openhft.chronicle.hash.impl.LocalLockState.READ_LOCKED;
|
||||
import static net.openhft.chronicle.hash.impl.LocalLockState.UNLOCKED;
|
||||
|
||||
|
||||
@Staged
|
||||
public class ReadLock implements InterProcessLock {
|
||||
|
||||
|
||||
@@ -143,7 +143,6 @@ public abstract class SegmentStages implements SegmentLock, LocksInterface {
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@Stage("Locks") public LocksInterface rootContextLockedOnThisSegment = null;
|
||||
/**
|
||||
* See the ChMap Ops spec, considerations of nested same-thread concurrent contexts.
|
||||
|
||||
@@ -58,7 +58,6 @@ public final class BuildVersion {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// another way to get the version is to read it from the manifest
|
||||
final String versionFromManifest = getVersionFromManifest();
|
||||
|
||||
@@ -81,7 +80,6 @@ public final class BuildVersion {
|
||||
return ChronicleMapBuilder.class.getPackage().getImplementationVersion();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* reads the pom file to get this version, only to be used for development or within the IDE.
|
||||
*
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package net.openhft.chronicle.hash.impl.util.math;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This is a utility class that provides computation methods related to the
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package net.openhft.chronicle.hash.impl.util.math;
|
||||
|
||||
|
||||
public class PoissonDistribution {
|
||||
|
||||
private static final double EPSILON = 1e-12;
|
||||
|
||||
@@ -89,8 +89,7 @@ class Precision {
|
||||
} else {
|
||||
isEqual = deltaMinus <= (maxUlps - deltaPlus);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return isEqual && !Double.isNaN(x) && !Double.isNaN(y);
|
||||
|
||||
|
||||
@@ -230,7 +230,6 @@ interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V> {
|
||||
return new ChronicleMapEntrySet<>(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
default void forEachEntry(final Consumer<? super MapEntry<K, V>> action) {
|
||||
forEachEntryWhile(c -> {
|
||||
|
||||
@@ -45,7 +45,6 @@ class JsonSerializer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static synchronized <K, V> void putAll(File fromFile, Map<K, V> map, List jsonConverters)
|
||||
throws IOException {
|
||||
final XStream xstream = xStream(map, jsonConverters);
|
||||
@@ -78,8 +77,7 @@ class JsonSerializer {
|
||||
" expecting an object of type com.thoughtworks.xstream.converters" +
|
||||
".Converter");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return xstream;
|
||||
} catch (NoClassDefFoundError e) {
|
||||
@@ -109,4 +107,3 @@ class JsonSerializer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import net.openhft.chronicle.map.replication.MapRemoteQueryContext;
|
||||
import net.openhft.sg.StageRef;
|
||||
import net.openhft.sg.Staged;
|
||||
|
||||
|
||||
@Staged
|
||||
public abstract class ReplicatedInput<K, V, R> implements RemoteOperationContext<K>,
|
||||
MapRemoteQueryContext<K, V, R>, Replica.QueryContext<K, V> {
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ public abstract class MapEntryOperationsDelegation<K, V, R> implements MapContex
|
||||
@StageRef CheckOnEachPublicOperation checkOnEachPublicOperation;
|
||||
@StageRef VanillaChronicleMapHolder<K, V, R> mh;
|
||||
|
||||
|
||||
@Override
|
||||
public R replaceValue(@NotNull MapEntry<K, V> entry, Data<V> newValue) {
|
||||
checkOnEachPublicOperation.checkOnEachPublicOperation();
|
||||
|
||||
@@ -36,7 +36,6 @@ import static net.openhft.chronicle.values.ValueModel.$$NATIVE;
|
||||
*/
|
||||
class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
|
||||
|
||||
private final Map<K, V> map;
|
||||
private final Class mapClazz;
|
||||
|
||||
@@ -45,14 +44,12 @@ class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
this.mapClazz = map.getClass();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canConvert(Class aClass) {
|
||||
//noinspection unchecked
|
||||
return mapClazz.isAssignableFrom(aClass);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void marshal(Object o, HierarchicalStreamWriter writer, MarshallingContext
|
||||
marshallingContext) {
|
||||
@@ -73,8 +70,7 @@ class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
}
|
||||
writer.endNode();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object unmarshal(HierarchicalStreamReader reader,
|
||||
@@ -154,8 +150,7 @@ class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
} catch (Exception e1) {
|
||||
throw new ConversionException("class=" + clazz, e1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,17 +42,14 @@ public class ByteBufferConverter implements Converter {
|
||||
marshallingContext.convertAnother(buffer.position());
|
||||
writer.endNode();
|
||||
|
||||
|
||||
writer.startNode("capacity");
|
||||
marshallingContext.convertAnother(buffer.capacity());
|
||||
writer.endNode();
|
||||
|
||||
|
||||
writer.startNode("limit");
|
||||
marshallingContext.convertAnother(buffer.limit());
|
||||
writer.endNode();
|
||||
|
||||
|
||||
writer.startNode("isDirect");
|
||||
marshallingContext.convertAnother(buffer.isDirect());
|
||||
writer.endNode();
|
||||
@@ -74,7 +71,6 @@ public class ByteBufferConverter implements Converter {
|
||||
throw new ConversionException("", e);
|
||||
}
|
||||
|
||||
|
||||
writer.endNode();
|
||||
|
||||
buffer.limit(limit);
|
||||
@@ -88,7 +84,6 @@ public class ByteBufferConverter implements Converter {
|
||||
int position = (Integer) unmarshallingContext.convertAnother(null, int.class);
|
||||
reader.moveUp();
|
||||
|
||||
|
||||
reader.moveDown();
|
||||
int capacity = (Integer) unmarshallingContext.convertAnother(null, int.class);
|
||||
reader.moveUp();
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.slf4j.LoggerFactory;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
|
||||
/**
|
||||
* @author Rob Austin.
|
||||
*/
|
||||
@@ -67,7 +66,6 @@ public class ValueConverter implements Converter {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
|
||||
final Method get = fieldModel.getOrGetVolatile();
|
||||
@@ -147,7 +145,6 @@ public class ValueConverter implements Converter {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canConvert(Class clazz) {
|
||||
return Values.isValueInterfaceOrImplClass(clazz);
|
||||
|
||||
Reference in New Issue
Block a user