Additional top-level classes in compilation unit: NullCache, MemoryCache.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static class | Cache.
Utility class that wraps a byte array and implements the equals() and hashCode() contract in a way suitable for Maps and caches. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract void | |
| public abstract V | |
| public static <K, V> Cache | newHardMemoryCache(int size)
Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by standard references. |
| public static <K, V> Cache | newHardMemoryCache(int size, int timeout)
Return a new memory cache with the specified maximum size, the specified maximum lifetime (in seconds), with the values held by standard references. |
| public static <K, V> Cache | |
| public static <K, V> Cache | newSoftMemoryCache(int size)
Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by SoftReferences. |
| public static <K, V> Cache | newSoftMemoryCache(int size, int timeout)
Return a new memory cache with the specified maximum size, the specified maximum lifetime (in seconds), with the values held by SoftReferences. |
| public static <K, V> Cache | |
| public abstract V | |
| public abstract void | |
| public void | put(K key, V value, boolean canQueue)
Add V to the cache with the option to use a QueueCacheEntry if the cache is configured for it. |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract int |
| Cache | back to summary |
|---|---|
| protected Cache() | |
| accept | back to summary |
|---|---|
| public abstract void accept(Cache. accept a visitor | |
| clear | back to summary |
|---|---|
| public abstract void clear() Remove all entries from the cache. | |
| get | back to summary |
|---|---|
| public abstract V get(Object key) Get a value from the cache. | |
| newHardMemoryCache | back to summary |
|---|---|
| public static <K, V> Cache Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by standard references. | |
| newHardMemoryCache | back to summary |
|---|---|
| public static <K, V> Cache Return a new memory cache with the specified maximum size, the specified maximum lifetime (in seconds), with the values held by standard references. | |
| newNullCache | back to summary |
|---|---|
| public static <K, V> Cache Return a dummy cache that does nothing.
| |
| newSoftMemoryCache | back to summary |
|---|---|
| public static <K, V> Cache Return a new memory cache with the specified maximum size, unlimited lifetime for entries, with the values held by SoftReferences. | |
| newSoftMemoryCache | back to summary |
|---|---|
| public static <K, V> Cache Return a new memory cache with the specified maximum size, the specified maximum lifetime (in seconds), with the values held by SoftReferences. | |
| newSoftMemoryQueue | back to summary |
|---|---|
| public static <K, V> Cache | |
| pull | back to summary |
|---|---|
| public abstract V pull(Object key) Pull an entry from the cache. | |
| put | back to summary |
|---|---|
| public abstract void put(K key, V value) Add an entry to the cache. | |
| put | back to summary |
|---|---|
| public void put(K key, V value, boolean canQueue) Add V to the cache with the option to use a QueueCacheEntry if the cache is configured for it. If the cache is not configured for a queue, V will silently add the entry directly. | |
| remove | back to summary |
|---|---|
| public abstract void remove(Object key) Remove an entry from the cache. | |
| setCapacity | back to summary |
|---|---|
| public abstract void setCapacity(int size) Set the maximum size. | |
| setTimeout | back to summary |
|---|---|
| public abstract void setTimeout(int timeout) Set the timeout(in seconds). | |
| size | back to summary |
|---|---|
| public abstract int size() Return the number of currently valid entries in the cache. | |
| visit | back to summary |
|---|---|
| public void visit(Map<K, V> map) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| EqualByteArray | back to summary |
|---|---|
| public EqualByteArray(byte[] b) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |