public class MemoryHandlerGroup extends java.lang.Object implements MemoryHandler
MemoryHandler.Cost| Constructor and Description |
|---|
MemoryHandlerGroup(java.lang.String description,
MemoryHandler.Cost cost)
Create a new memory group.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MemoryHandler handler)
register a memory handler.
|
long |
freeMemory(double percentage)
Free memory at this level and below.
|
MemoryHandler.Cost |
getCost()
The cost level for this MemoryHandler.
|
java.lang.String |
getDescription()
The description
|
long |
getEstimatedSize()
The estimated size of data held by this memory handler
|
int |
getHardLinkCount()
How many items do we have a hard link on ?
|
long |
getLastAccessed()
The last time this memory handle was accessed
|
MemoryHandler[] |
list()
List of memory handlers that have been registered.
|
long |
panicFreeMemory()
Clear all memory ASAP.
|
long |
queuedFreeMemory(double percentage)
This method should implement the freeing of the method and maybe synchronized.
|
int |
size()
The estimated number of items held.
|
long |
tidyUp()
Tidy up the memory handler
|
java.lang.String |
toString()
The description
|
public MemoryHandlerGroup(@Nonnull
java.lang.String description,
@Nonnull
MemoryHandler.Cost cost)
description - The descriptioncost - the cost@Nonnull @CheckReturnValue public java.lang.String toString()
toString in class java.lang.Object@Nonnull @CheckReturnValue public java.lang.String getDescription()
public void add(@Nonnull
MemoryHandler handler)
handler - The memory handler to register.@Nonnull @CheckReturnValue public MemoryHandler.Cost getCost()
getCost in interface MemoryHandlerpublic long freeMemory(@Nonnegative
double percentage)
freeMemory in interface MemoryHandlerpercentage - to be freed@CheckReturnValue public int getHardLinkCount()
@CheckReturnValue public int size()
@Nonnull @CheckReturnValue public MemoryHandler[] list()
public long tidyUp()
tidyUp in interface MemoryHandlerpublic long panicFreeMemory()
panicFreeMemory in interface MemoryHandlerpublic long queuedFreeMemory(@Nonnegative
double percentage)
queuedFreeMemory in interface MemoryHandlerpercentage - The percentage to be cleared.@CheckReturnValue @Nonnegative public long getEstimatedSize()
getEstimatedSize in interface MemoryHandler@CheckReturnValue public long getLastAccessed()
getLastAccessed in interface MemoryHandlerstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.