Package org.apache.openjpa.lib.util
Interface SizedMap
-
- All Superinterfaces:
java.util.Map
- All Known Implementing Classes:
ConcurrentHashMap
,ConcurrentReferenceHashMap
,LRUMap
,ReferenceHashMap
public interface SizedMap extends java.util.Map
AMap
type that maintains a maximum size, automatically removing entries when the maximum is exceeded.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getMaxSize()
The maximum number of entries, or Integer.MAX_VALUE for no limit.boolean
isFull()
Whether the map is full.void
overflowRemoved(java.lang.Object key, java.lang.Object value)
Overridable callback for when an overflow entry is automatically removed.void
setMaxSize(int max)
The maximum number of entries, or Integer.MAX_VALUE for no limit.
-
-
-
Method Detail
-
getMaxSize
int getMaxSize()
The maximum number of entries, or Integer.MAX_VALUE for no limit.
-
setMaxSize
void setMaxSize(int max)
The maximum number of entries, or Integer.MAX_VALUE for no limit.
-
isFull
boolean isFull()
Whether the map is full.
-
overflowRemoved
void overflowRemoved(java.lang.Object key, java.lang.Object value)
Overridable callback for when an overflow entry is automatically removed.
-
-