Package org.eclipse.emf.common.util
Class URI.URIPool
java.lang.Object
- All Implemented Interfaces:
Serializable,Iterable<URI>,Collection<URI>,Set<URI>,InterningSet<URI>
- Enclosing class:
URI
A pool for caching URIs.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA specialized weak reference used byObject.toString()that removes the URI's reference whenURI.URIPool.CachedToString.clear()is called.protected static classAn Access unit for file URI string-based access.protected static classAn access units for platform URI string-based access.protected static classAn access unit for basic string access.protected static classAn Access unit for component-based access.protected static classA based access unit for this pool.Nested classes/interfaces inherited from class org.eclipse.emf.common.util.Pool
Pool.AccessUnit<E>, Pool.ExternalRehasher<E>, Pool.ObjectAccessUnit<E>, Pool.PoolEntry<E>Nested classes/interfaces inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
WeakInterningHashSet.Entry<E>, WeakInterningHashSet.SelfCleaningEntry<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReferenceQueue<String> A reference queue for managing theObject.toString()values.protected final URI.URIPool.FileAccessUnit.QueueAccess units for file URI string-based access.protected final URI.URIPool.PlatformAccessUnit.QueueAccess units for platform URI string-based access.protected static final longprotected final URI.URIPool.StringAccessUnit.QueueAccess units for basic string access.protected final URI.URIPool.URIComponentsAccessUnit.QueueAccess units for component-based access.Fields inherited from class org.eclipse.emf.common.util.Pool
accessCount, cleanupPeriod, primaryAccessUnits, readLock, readWriteLock, writeLockFields inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
capacityIndex, containsNull, entries, externalQueue, internalQueue, modCount, NULL_ENTRY, PRIME_CAPACITIES, size, threshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidSpecialized to manage thecachedToStrings.protected URIintern(boolean isExclusive, boolean hierarchical, String scheme, String authority, String device, boolean absolutePath, String[] segments, String query, int hashCode) Intern a URI from its component parts.protected URIintern(boolean isExclusive, int validate, boolean hierarchical, String scheme, String authority, String device, boolean absolutePath, String[] segments, String query) Intern a URI from its component parts.protected URIIntern a URI from its string representation, parsing if necessary.protected URIIntern a platform URI from its path representation, parsing if necessary.protected URIinternFile(String pathName) Intern a file URI from its path representation, parsing if necessary.protected WeakReference<String> newCachedToString(URI uri, String string) Methods inherited from class org.eclipse.emf.common.util.Pool
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, toStringMethods inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
addEntry, asInstance, dump, equals, hashCode, index, newEntries, newEntry, newInternalEntry, nullEntry, putEntry, removeEntry, removeEntry, sizeMethods inherited from class java.util.AbstractCollection
addAll, isEmptyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
addAll, isEmpty, spliterator
-
Field Details
-
serialVersionUID
protected static final long serialVersionUID- See Also:
-
cachedToStrings
A reference queue for managing theObject.toString()values. -
stringAccessUnits
Access units for basic string access. -
platformAccessUnits
Access units for platform URI string-based access. -
fileAccessUnits
Access units for file URI string-based access. -
uriComponentsAccessUnits
Access units for component-based access.
-
-
Constructor Details
-
URIPool
-
-
Method Details
-
intern
Intern a URI from its string representation, parsing if necessary. The string must not contain the fragment separator. -
intern
Intern a platform URI from its path representation, parsing if necessary. -
internFile
Intern a file URI from its path representation, parsing if necessary. -
intern
protected URI intern(boolean isExclusive, int validate, boolean hierarchical, String scheme, String authority, String device, boolean absolutePath, String[] segments, String query) Intern a URI from its component parts. IfisExclusiveis true, acquire thePool.writeLockfirst. Useintern(boolean, boolean, String, String, String, boolean, String[], String, int)if the hash code is known and no validation is required. -
intern
protected URI intern(boolean isExclusive, boolean hierarchical, String scheme, String authority, String device, boolean absolutePath, String[] segments, String query, int hashCode) Intern a URI from its component parts. IfisExclusiveis true, acquire thePool.writeLockfirst. -
doCleanup
protected void doCleanup()Specialized to manage thecachedToStrings. -
newCachedToString
-