Package one.microstream.memory.sun
Class SunJdk8Internals
java.lang.Object
one.microstream.memory.sun.SunJdk8Internals
public final class SunJdk8Internals extends Object
-
Constructor Summary
Constructors Constructor Description SunJdk8Internals()
-
Method Summary
Modifier and Type Method Description static Object[]
accessArray(ArrayList<?> arrayList)
static Object[]
accessArray(PriorityQueue<?> priorityQueue)
static Object[]
accessArray(Vector<?> vector)
static Properties
accessDefaults(Properties properties)
static boolean
getAccessOrder(LinkedHashMap<?,?> linkedHashMap)
static int
getCapacityIncrement(Vector<?> vector)
static int
getElementCount(Vector<?> vector)
static float
getLoadFactor(HashMap<?,?> hashMap)
static float
getLoadFactor(HashSet<?> hashSet)
My god.static float
getLoadFactor(Hashtable<?,?> hashtable)
static float
getLoadFactor(LinkedHashMap<?,?> linkedHashMap)
static void
setCapacityIncrement(Vector<?> vector, int size)
static void
setDefaults(Properties properties, Properties defaults)
static void
setElementCount(Vector<?> vector, int size)
static void
setSize(ArrayList<?> arrayList, int size)
static void
setSize(PriorityQueue<?> priorityQueue, int size)
-
Constructor Details
-
SunJdk8Internals
public SunJdk8Internals()
-
-
Method Details
-
accessArray
-
setSize
-
getLoadFactor
My god. How incompetent can one be: they provide a constructor for configuring the load factor, but they provide no means to querying it. So if a hashset instance shall be transformed to another context and back (e.g. persistence), what is one supposed to do? Ignore the load factor and change the program behavior? What harm would it do to add an implementation-specific getter?Not to mention the set wraps a map internally which is THE most moronic thing to do both memory- and performance-wise.
So another hack method has to provide basic functionality that is missing in the JDK. And should they ever get the idea to implement the set properly, this method will break.
- Parameters:
hashSet
-
-
getLoadFactor
-
getLoadFactor
-
getLoadFactor
-
getAccessOrder
-
accessArray
-
getElementCount
-
setElementCount
-
getCapacityIncrement
-
setCapacityIncrement
-
accessDefaults
-
setDefaults
-
accessArray
-
setSize
-