public final class CapacityUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CAPACITY
Default capacity for a hash container.
|
static float |
DEFAULT_LOAD_FACTOR
Default load factor.
|
static int |
MAX_INT_CAPACITY
Maximum length of a Java array that is a power of two.
|
static long |
MAX_LONG_CAPACITY
Maximum length of an off-heap array that is a power of two.
|
static int |
MIN_CAPACITY
Minimum capacity for a hash container.
|
Modifier and Type | Method and Description |
---|---|
static int |
nextCapacity(int current)
Returns the next possible capacity, counting from the current buffers' size.
|
static long |
nextCapacity(long current)
Returns the next possible capacity, counting from the current buffers' size.
|
static int |
roundCapacity(int requestedCapacity)
Round the capacity to the next allowed value.
|
static long |
roundCapacity(long requestedCapacity)
Round the capacity to the next allowed value.
|
public static final int MAX_INT_CAPACITY
public static final long MAX_LONG_CAPACITY
public static final int MIN_CAPACITY
public static final int DEFAULT_CAPACITY
public static final float DEFAULT_LOAD_FACTOR
public static long roundCapacity(long requestedCapacity)
public static int roundCapacity(int requestedCapacity)
public static int nextCapacity(int current)
public static long nextCapacity(long current)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.