@NotNull private static IntObjectLinkedMap.MapEntry<CharSequence> cacheData(String name, int id, int stripe) { if (name == null) { ourNames.markCorrupted(); throw new RuntimeException("VFS name enumerator corrupted"); } CharSequence rawName = ByteArrayCharSequence.convertToBytesIfAsciiString(name); IntObjectLinkedMap.MapEntry<CharSequence> entry = new IntObjectLinkedMap.MapEntry<CharSequence>(id, rawName); IntSLRUCache<IntObjectLinkedMap.MapEntry<CharSequence>> cache = ourNameCache[stripe]; //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (cache) { return cache.cacheEntry(entry); } }
@Nonnull private static IntObjectLinkedMap.MapEntry<CharSequence> cacheData(String name, int id, int stripe) { if (name == null) { ourNames.markCorrupted(); throw new RuntimeException("VFS name enumerator corrupted"); } CharSequence rawName = ByteArrayCharSequence.convertToBytesIfAsciiString(name); IntObjectLinkedMap.MapEntry<CharSequence> entry = new IntObjectLinkedMap.MapEntry<CharSequence>(id, rawName); IntSLRUCache<IntObjectLinkedMap.MapEntry<CharSequence>> cache = ourNameCache[stripe]; //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (cache) { return cache.cacheEntry(entry); } }