public class SortedResultsMap extends java.lang.Object implements MemoryHandler, java.util.Comparator
MemoryHandler.Cost
Constructor and Description |
---|
SortedResultsMap(java.lang.String orderBy,
DBResult dbResult,
int maxRows) |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
INTERNAL ONLY.
|
long |
freeMemory(double percent)
Free memory at this level and below.
|
MemoryHandler.Cost |
getCost()
The cost of this Memory Handler
|
long |
getEstimatedSize()
The estimated size of data held by this memory handler
|
long |
getLastAccessed()
The last time this memory handle was accessed
|
java.lang.String |
getOrderBy()
Returns the current order by clause.
|
int |
getRealRow(int requestedRow) |
long |
panicFreeMemory()
Clear all memory ASAP.
|
static java.util.ArrayList |
parseSortOrder(DBClassConcrete dbClass,
DBResult dbResult,
java.lang.String orderBy) |
long |
queuedFreeMemory(double percent)
This method should implement the freeing of the method and maybe synchronized.
|
long |
tidyUp()
Tidy up the memory handler
|
public SortedResultsMap(@Nonnull java.lang.String orderBy, @Nonnull DBResult dbResult, int maxRows) throws java.lang.NoSuchFieldException
orderBy
- dbResult
- maxRows
- java.lang.NoSuchFieldException
public long getLastAccessed()
MemoryHandler
getLastAccessed
in interface MemoryHandler
public int getRealRow(int requestedRow)
requestedRow
- public static java.util.ArrayList parseSortOrder(DBClassConcrete dbClass, DBResult dbResult, java.lang.String orderBy) throws java.lang.NoSuchFieldException
dbClass
- the classdbResult
- orderBy
- java.lang.NoSuchFieldException
public java.lang.String getOrderBy()
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
o1
- o2
- @Nonnull public MemoryHandler.Cost getCost()
getCost
in interface MemoryHandler
public long freeMemory(double percent)
freeMemory
in interface MemoryHandler
percent
- public long panicFreeMemory()
panicFreeMemory
in interface MemoryHandler
public long queuedFreeMemory(double percent)
MemoryHandler
queuedFreeMemory
in interface MemoryHandler
percent
- @CheckReturnValue @Nonnegative public long getEstimatedSize()
MemoryHandler
getEstimatedSize
in interface MemoryHandler
public long tidyUp()
MemoryHandler
tidyUp
in interface MemoryHandler
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.