Package com.esotericsoftware.kryo.pool
Class SoftReferenceQueue
java.lang.Object
com.esotericsoftware.kryo.pool.SoftReferenceQueue
Internally uses
SoftReferences for queued Kryo instances, most importantly adjusts the poll
behavior so that GC'ed Kryo instances are skipped. Most other methods are unsupported.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Kryo> c) voidclear()booleanbooleancontainsAll(Collection<?> c) element()booleaninthashCode()booleanisEmpty()iterator()booleanpeek()poll()remove()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream
-
Field Details
-
delegate
-
-
Constructor Details
-
SoftReferenceQueue
-
-
Method Details
-
poll
-
offer
-
add
-
size
public int size()- Specified by:
sizein interfaceCollection<Kryo>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Kryo>
-
contains
- Specified by:
containsin interfaceCollection<Kryo>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Kryo>
-
equals
- Specified by:
equalsin interfaceCollection<Kryo>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Kryo>- Overrides:
hashCodein classObject
-
toString
-
iterator
-
remove
-
toArray
- Specified by:
toArrayin interfaceCollection<Kryo>
-
element
-
peek
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Kryo>
-
remove
- Specified by:
removein interfaceCollection<Kryo>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Kryo>
-
addAll
- Specified by:
addAllin interfaceCollection<Kryo>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Kryo>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Kryo>
-