| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class | |
| public static interface | JMemoryBuddy.
This class provides different methods, which can be used to declare memory-constraints. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private static final int | |
| private static String | |
| private static String | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | assertCollectable(WeakReference<?>
The WeakReference to check. weakReference)Checks whether the content of the WeakReference can be collected. |
| public static void | assertNotCollectable(WeakReference<Object>
The WeakReference to check. weakReference)Checks whether the content of the WeakReference cannot be collected. |
| public static boolean | Returns: Returns true, when the provided WeakReference can be collected.The WeakReference to check. weakReference)Checks whether the content of the WeakReference can be collected. |
| private static int | |
| public static boolean | Returns: Returns true, when the provided WeakReference cannot be collected.The WeakReference to check. weakReference)Checks whether the content of the WeakReference cannot be collected. |
| pack-priv static void | |
| pack-priv static void | |
| private static String | |
| private static HotSpotDiagnosticMXBean | |
| public static void | memoryTest(Consumer<JMemoryBuddy.
A function which gets executed with the API to define the required memory semantic. fA standard method to define a test which checks code for specific memory semantic. |
| private static void |
| createHeapdump | back to summary |
|---|---|
| private static final boolean createHeapdump | |
| garbageAmount | back to summary |
|---|---|
| private static final int garbageAmount | |
| mxBeanProxyName | back to summary |
|---|---|
| private static String mxBeanProxyName | |
| outputFolderString | back to summary |
|---|---|
| private static String outputFolderString | |
| sleepDuration | back to summary |
|---|---|
| private static final int sleepDuration | |
| steps | back to summary |
|---|---|
| private static final int steps | |
| testDuration | back to summary |
|---|---|
| private static final int testDuration | |
| JMemoryBuddy | back to summary |
|---|---|
| public JMemoryBuddy() | |
| assertCollectable | back to summary |
|---|---|
| public static void assertCollectable(WeakReference<?> weakReference) Checks whether the content of the WeakReference can be collected.
| |
| assertNotCollectable | back to summary |
|---|---|
| public static void assertNotCollectable(WeakReference<Object> weakReference) Checks whether the content of the WeakReference cannot be collected.
| |
| checkCollectable | back to summary |
|---|---|
| public static boolean checkCollectable(WeakReference<?> weakReference) Checks whether the content of the WeakReference can be collected.
| |
| checkCollectable | back to summary |
|---|---|
| private static int checkCollectable(int stepsLeft, WeakReference<?> weakReference) | |
| checkNotCollectable | back to summary |
|---|---|
| public static boolean checkNotCollectable(WeakReference<?> weakReference) Checks whether the content of the WeakReference cannot be collected.
| |
| createGarbage | back to summary |
|---|---|
| pack-priv static void createGarbage() | |
| createHeapDump | back to summary |
|---|---|
| pack-priv static void createHeapDump() | |
| getDefaultOutputFolder | back to summary |
|---|---|
| private static String getDefaultOutputFolder() | |
| getHotspotMBean | back to summary |
|---|---|
| private static HotSpotDiagnosticMXBean getHotspotMBean() throws IOException | |
| memoryTest | back to summary |
|---|---|
| public static void memoryTest(Consumer<JMemoryBuddy. A standard method to define a test which checks code for specific memory semantic. The parameter of the lambda provides an API to define the required memory semantic.
| |
| setMxBeanProxyName | back to summary |
|---|---|
| private static void setMxBeanProxyName(String mxBeanName) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv WeakReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv WeakReference | |
| public String |
| assertCollectable | back to summary |
|---|---|
| pack-priv WeakReference<?> assertCollectable | |
| AssertCollectable | back to summary |
|---|---|
| pack-priv AssertCollectable(WeakReference<?> ref) | |
| getWeakReference | back to summary |
|---|---|
| pack-priv WeakReference | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv WeakReference | |
| pack-priv String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv WeakReference | |
| public String |
| assertNotCollectable | back to summary |
|---|---|
| pack-priv WeakReference<?> assertNotCollectable | |
| originalResultOfToString | back to summary |
|---|---|
| pack-priv String originalResultOfToString | |
| AssertNotCollectable | back to summary |
|---|---|
| pack-priv AssertNotCollectable(Object ref) | |
| getWeakReference | back to summary |
|---|---|
| pack-priv WeakReference | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Method and Description |
|---|---|
| public void | assertCollectable(Object
The reference which should be collectable. ref)After executing the lambda, the provided ref must be collectable. |
| public void | assertNotCollectable(Object
The reference which should not be collectable. ref)After executing the lambda, the provided ref must be not collectable. |
| public void | setAsReferenced(Object
The reference which should get a hard reference for this test. ref)The provided reference will be reference hard, so it won't be collected, until memoryTest finishes. |
| assertCollectable | back to summary |
|---|---|
| public void assertCollectable(Object ref) After executing the lambda, the provided ref must be collectable. Otherwise, an Exception is thrown.
| |
| assertNotCollectable | back to summary |
|---|---|
| public void assertNotCollectable(Object ref) After executing the lambda, the provided ref must be not collectable. Otherwise, an Exception is thrown.
| |
| setAsReferenced | back to summary |
|---|---|
| public void setAsReferenced(Object ref) The provided reference will be reference hard, so it won't be collected, until memoryTest finishes.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| setAsReferenced | back to summary |
|---|---|
| pack-priv Object setAsReferenced | |
| SetAsReferenced | back to summary |
|---|---|
| pack-priv SetAsReferenced(Object ref) | |