Package com.biglybt.core.util
Class StringInterner
java.lang.Object
com.biglybt.core.util.StringInterner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static interface
NOTE this should always return the same string, it is not intended to support a mutable result...static class
static class
As above, must always return the same string.private static class
private static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
static boolean
Can't be final as set true for a few specific appsprivate static final Map
<WeakReference<StringInterner.FileKey>, String> private static final ReferenceQueue
<StringInterner.FileKey> private static final int
private static final int
private static final LightHashSet
private static final ReferenceQueue
(package private) static final ReadWriteLock
private static final Comparator
private static final int
private static final int
private static final int
private static final int
private static final boolean
private static final boolean
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DISABLE_INTERNING
public static boolean DISABLE_INTERNINGCan't be final as set true for a few specific apps -
SCHEDULED_CLEANUP_INTERVAL
private static final int SCHEDULED_CLEANUP_INTERVAL- See Also:
-
TRACE_CLEANUP
private static final boolean TRACE_CLEANUP- See Also:
-
TRACE_MULTIHITS
private static final boolean TRACE_MULTIHITS- See Also:
-
IMMEDIATE_CLEANUP_TRIGGER
private static final int IMMEDIATE_CLEANUP_TRIGGER- See Also:
-
IMMEDIATE_CLEANUP_GOAL
private static final int IMMEDIATE_CLEANUP_GOAL- See Also:
-
SCHEDULED_CLEANUP_TRIGGER
private static final int SCHEDULED_CLEANUP_TRIGGER- See Also:
-
SCHEDULED_CLEANUP_GOAL
private static final int SCHEDULED_CLEANUP_GOAL- See Also:
-
SCHEDULED_AGING_THRESHOLD
private static final int SCHEDULED_AGING_THRESHOLD- See Also:
-
managedInterningSet
-
managedSetLock
-
managedRefQueue
-
COMMON_KEYS
-
savingsComp
-
TRACK_FILE_KEYS
private static final boolean TRACK_FILE_KEYS -
file_key_ref_queue
-
file_key_map
-
-
Constructor Details
-
StringInterner
public StringInterner()
-
-
Method Details
-
intern
-
internURL
This is based on File.hashCode() and File.equals(), which can return different values for different representations of the same paths. Thus internFile should be used with canonized Files exclusively -
sanitize
private static void sanitize(boolean scheduled)
-