protected static class SegmentSequence.SegmentSequencePool extends Pool<SegmentSequence>
Modifier and Type | Class and Description |
---|---|
protected static class |
SegmentSequence.SegmentSequencePool.AccessUnitBase
A base class for all this pool's access units.
|
protected static class |
SegmentSequence.SegmentSequencePool.CachedToString
|
protected static class |
SegmentSequence.SegmentSequencePool.SegmentsAccessUnit
An access unit for accessing a delimiter and segments.
|
protected static class |
SegmentSequence.SegmentSequencePool.SegmentsAndSegmentAccessUnit
An access unit for accessing segments and one additional segment.
|
protected static class |
SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit
An access units for accessing the composition of two sets of segments.
|
protected static class |
SegmentSequence.SegmentSequencePool.StringAccessUnit
An access unit for basic string access.
|
Pool.AccessUnit<E>, Pool.ExternalRehasher<E>, Pool.ObjectAccessUnit<E>, Pool.PoolEntry<E>
WeakInterningHashSet.Entry<E>, WeakInterningHashSet.SelfCleaningEntry<E>
Modifier and Type | Field and Description |
---|---|
protected java.lang.ref.ReferenceQueue<java.lang.String> |
cachedToStrings
A reference queue for internally managing the collection of cached
SegmentSequence.toString s. |
protected SegmentSequence.SegmentSequencePool.SegmentsAccessUnit.Queue |
segmentsAccessUnits
Access units for accessing a delimiter and segments.
|
protected SegmentSequence.SegmentSequencePool.SegmentsAndSegmentAccessUnit.Queue |
segmentsAndSegmentAccessUnits
Access units for accessing segments and one additional segment.
|
protected SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit.Queue |
segmentsAndSegmentsAccessUnits
Access units for accessing the composition of two sequences of segments.
|
protected SegmentSequence.SegmentSequencePool.StringAccessUnit.Queue |
stringAccessUnits
Access units for basic string access.
|
accessCount, cleanupPeriod, primaryAccessUnits, readLock, readWriteLock, writeLock
capacityIndex, containsNull, entries, externalQueue, internalQueue, modCount, NULL_ENTRY, PRIME_CAPACITIES, size, threshold
Constructor and Description |
---|
SegmentSequence.SegmentSequencePool(java.lang.ref.ReferenceQueue<java.lang.Object> queue)
Creates an instance managed the given external queue.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doCleanup()
Specialized to also clean up the
cachedToStrings . |
protected SegmentSequence |
intern(boolean needsCopying,
boolean needsToIntern,
java.lang.String delimiter,
java.lang.String[] segments,
int count)
Interns the segments, taking into account the delimiter,
copying the array, when needed,
and interning the segments themselves, when needed.
|
protected SegmentSequence |
intern(int hashCode,
java.lang.String delimiter,
java.lang.String[] segments,
java.lang.String segment)
Interns the segments along with the one additional segment, taking into account the delimiter and interning the additional segment.
|
protected SegmentSequence |
intern(int hashCode,
java.lang.String delimiter,
java.lang.String[] segments1,
java.lang.String[] segments2,
boolean needsToIntern)
Interns the composed segments, taking into account the delimiter.
|
protected SegmentSequence |
intern(java.lang.String delimiter,
java.lang.String value)
Interns the string representation of a segment sequence, splitting it into appropriate segments based on the delimiter.
|
protected java.lang.ref.WeakReference<java.lang.String> |
newCachedToString(SegmentSequence segmentSequence,
java.lang.String string)
|
access, add, addEntry, cleanup, clear, contains, containsAll, doIntern, ensureCapacity, equals, get, getEntry, getReadLock, getWriteLock, grow, hashCode, intern, iterator, newDefaultAccessUnits, newExternalEntry, remove, removeAll, retainAll, toArray, toArray, toString
addEntry, asInstance, dump, equals, hashCode, index, newEntries, newEntry, newInternalEntry, nullEntry, putEntry, removeEntry, removeEntry, size
protected final SegmentSequence.SegmentSequencePool.StringAccessUnit.Queue stringAccessUnits
protected final SegmentSequence.SegmentSequencePool.SegmentsAccessUnit.Queue segmentsAccessUnits
protected final SegmentSequence.SegmentSequencePool.SegmentsAndSegmentAccessUnit.Queue segmentsAndSegmentAccessUnits
protected final SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit.Queue segmentsAndSegmentsAccessUnits
protected final java.lang.ref.ReferenceQueue<java.lang.String> cachedToStrings
SegmentSequence.toString
s.public SegmentSequence.SegmentSequencePool(java.lang.ref.ReferenceQueue<java.lang.Object> queue)
protected void doCleanup()
cachedToStrings
.doCleanup
in class Pool<SegmentSequence>
protected java.lang.ref.WeakReference<java.lang.String> newCachedToString(SegmentSequence segmentSequence, java.lang.String string)
segmentSequence
- string
- protected SegmentSequence intern(java.lang.String delimiter, java.lang.String value)
protected SegmentSequence intern(boolean needsCopying, boolean needsToIntern, java.lang.String delimiter, java.lang.String[] segments, int count)
protected SegmentSequence intern(int hashCode, java.lang.String delimiter, java.lang.String[] segments, java.lang.String segment)
protected SegmentSequence intern(int hashCode, java.lang.String delimiter, java.lang.String[] segments1, java.lang.String[] segments2, boolean needsToIntern)