protected static class URI.URIPool extends Pool<URI>
Modifier and Type | Class and Description |
---|---|
protected static class |
URI.URIPool.CachedToString
A specialized weak reference used by
Object.toString() that removes the URI's reference when URI.URIPool.CachedToString.clear() is called. |
protected static class |
URI.URIPool.FileAccessUnit
An Access unit for file URI string-based access.
|
protected static class |
URI.URIPool.PlatformAccessUnit
An access units for platform URI string-based access.
|
protected static class |
URI.URIPool.StringAccessUnit
An access unit for basic string access.
|
protected static class |
URI.URIPool.URIComponentsAccessUnit
An Access unit for component-based access.
|
protected static class |
URI.URIPool.URIPoolAccessUnitBase
A based access unit for this pool.
|
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 managing the
Object.toString() values. |
protected URI.URIPool.FileAccessUnit.Queue |
fileAccessUnits
Access units for file URI string-based access.
|
protected URI.URIPool.PlatformAccessUnit.Queue |
platformAccessUnits
Access units for platform URI string-based access.
|
protected static long |
serialVersionUID |
protected URI.URIPool.StringAccessUnit.Queue |
stringAccessUnits
Access units for basic string access.
|
protected URI.URIPool.URIComponentsAccessUnit.Queue |
uriComponentsAccessUnits
Access units for component-based access.
|
accessCount, cleanupPeriod, primaryAccessUnits, readLock, readWriteLock, writeLock
capacityIndex, containsNull, entries, externalQueue, internalQueue, modCount, NULL_ENTRY, PRIME_CAPACITIES, size, threshold
Constructor and Description |
---|
URI.URIPool(java.lang.ref.ReferenceQueue<java.lang.Object> queue) |
Modifier and Type | Method and Description |
---|---|
protected void |
doCleanup()
Specialized to manage the
cachedToStrings . |
protected URI |
intern(boolean isExclusive,
boolean hierarchical,
java.lang.String scheme,
java.lang.String authority,
java.lang.String device,
boolean absolutePath,
java.lang.String[] segments,
java.lang.String query,
int hashCode)
Intern a URI from its component parts.
|
protected URI |
intern(boolean isExclusive,
int validate,
boolean hierarchical,
java.lang.String scheme,
java.lang.String authority,
java.lang.String device,
boolean absolutePath,
java.lang.String[] segments,
java.lang.String query)
Intern a URI from its component parts.
|
protected URI |
intern(java.lang.String string)
Intern a URI from its string representation, parsing if necessary.
|
protected URI |
intern(java.lang.String base,
java.lang.String pathName,
boolean encode)
Intern a platform URI from its path representation, parsing if necessary.
|
protected URI |
internFile(java.lang.String pathName)
Intern a file URI from its path representation, parsing if necessary.
|
protected java.lang.ref.WeakReference<java.lang.String> |
newCachedToString(URI uri,
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 static final long serialVersionUID
protected final java.lang.ref.ReferenceQueue<java.lang.String> cachedToStrings
Object.toString()
values.protected final URI.URIPool.StringAccessUnit.Queue stringAccessUnits
protected final URI.URIPool.PlatformAccessUnit.Queue platformAccessUnits
protected final URI.URIPool.FileAccessUnit.Queue fileAccessUnits
protected final URI.URIPool.URIComponentsAccessUnit.Queue uriComponentsAccessUnits
public URI.URIPool(java.lang.ref.ReferenceQueue<java.lang.Object> queue)
protected URI intern(java.lang.String string)
protected URI intern(java.lang.String base, java.lang.String pathName, boolean encode)
protected URI internFile(java.lang.String pathName)
protected URI intern(boolean isExclusive, int validate, boolean hierarchical, java.lang.String scheme, java.lang.String authority, java.lang.String device, boolean absolutePath, java.lang.String[] segments, java.lang.String query)
isExclusive
is true, acquire the Pool.writeLock
first.
Use intern(boolean, boolean, String, String, String, boolean, String[], String, int)
if the hash code is known and no validation is required.protected URI intern(boolean isExclusive, boolean hierarchical, java.lang.String scheme, java.lang.String authority, java.lang.String device, boolean absolutePath, java.lang.String[] segments, java.lang.String query, int hashCode)
isExclusive
is true, acquire the Pool.writeLock
first.protected void doCleanup()
cachedToStrings
.protected java.lang.ref.WeakReference<java.lang.String> newCachedToString(URI uri, java.lang.String string)