mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Standard code formatting
This commit is contained in:
@@ -56,20 +56,31 @@ public class VanillaChronicleMap<K, V, R>
|
||||
ExternalMapQueryContext<K, V, ?>>
|
||||
implements AbstractChronicleMap<K, V> {
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Value Data model
|
||||
Class<V> valueClass;
|
||||
public SizeMarshaller valueSizeMarshaller;
|
||||
public SizedReader<V> valueReader;
|
||||
public DataAccess<V> valueDataAccess;
|
||||
|
||||
public boolean constantlySizedEntry;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Memory management and dependent fields
|
||||
public int alignment;
|
||||
public int worstAlignment;
|
||||
|
||||
public transient boolean couldNotDetermineAlignmentBeforeAllocation;
|
||||
/**
|
||||
* @see net.openhft.chronicle.set.SetFromMap
|
||||
*/
|
||||
public transient ChronicleSet<K> chronicleSet;
|
||||
public transient MapEntryOperations<K, V, R> entryOperations;
|
||||
public transient MapMethods<K, V, R> methods;
|
||||
public transient DefaultValueProvider<K, V> defaultValueProvider;
|
||||
/////////////////////////////////////////////////
|
||||
// Value Data model
|
||||
Class<V> valueClass;
|
||||
/////////////////////////////////////////////////
|
||||
// Behavior
|
||||
transient boolean putReturnsNull;
|
||||
transient boolean removeReturnsNull;
|
||||
transient Set<Entry<K, V>> entrySet;
|
||||
transient ThreadLocal<ContextHolder> cxt;
|
||||
/////////////////////////////////////////////////
|
||||
private transient String name;
|
||||
/**
|
||||
@@ -78,25 +89,7 @@ public class VanillaChronicleMap<K, V, R>
|
||||
* initOwnTransients().
|
||||
*/
|
||||
private transient String identityString;
|
||||
|
||||
public transient boolean couldNotDetermineAlignmentBeforeAllocation;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Behavior
|
||||
transient boolean putReturnsNull;
|
||||
transient boolean removeReturnsNull;
|
||||
|
||||
transient Set<Entry<K, V>> entrySet;
|
||||
|
||||
/** @see net.openhft.chronicle.set.SetFromMap */
|
||||
public transient ChronicleSet<K> chronicleSet;
|
||||
|
||||
public transient MapEntryOperations<K, V, R> entryOperations;
|
||||
public transient MapMethods<K, V, R> methods;
|
||||
private transient boolean defaultEntryOperationsAndMethods;
|
||||
public transient DefaultValueProvider<K, V> defaultValueProvider;
|
||||
|
||||
transient ThreadLocal<ContextHolder> cxt;
|
||||
|
||||
public VanillaChronicleMap(ChronicleMapBuilder<K, V> builder) throws IOException {
|
||||
super(builder);
|
||||
@@ -116,6 +109,10 @@ public class VanillaChronicleMap<K, V, R>
|
||||
initTransients();
|
||||
}
|
||||
|
||||
public static long alignAddr(long addr, long alignment) {
|
||||
return (addr + alignment - 1) & ~(alignment - 1L);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readMarshallableFields(@NotNull WireIn wireIn) {
|
||||
super.readMarshallableFields(wireIn);
|
||||
@@ -287,7 +284,7 @@ public class VanillaChronicleMap<K, V, R>
|
||||
", identityHashCode=" + System.identityHashCode(this) +
|
||||
"}";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
forEachEntry(c -> c.context().remove(c));
|
||||
@@ -306,10 +303,6 @@ public class VanillaChronicleMap<K, V, R>
|
||||
entry.readSkip(skip);
|
||||
}
|
||||
|
||||
public static long alignAddr(long addr, long alignment) {
|
||||
return (addr + alignment - 1) & ~(alignment - 1L);
|
||||
}
|
||||
|
||||
final ChainingInterface q() {
|
||||
ThreadLocal<ContextHolder> cxt = this.cxt;
|
||||
if (cxt == null)
|
||||
@@ -601,7 +594,8 @@ public class VanillaChronicleMap<K, V, R>
|
||||
searchLoop:
|
||||
while (true) {
|
||||
long entryPos;
|
||||
nextPos: {
|
||||
nextPos:
|
||||
{
|
||||
while (true) {
|
||||
long entry = hl.readEntryVolatile(tierBaseAddr, hlPos);
|
||||
if (hl.empty(entry)) {
|
||||
|
||||
Reference in New Issue
Block a user