@SuppressWarnings("resource") public static Ref<GlobalTidy> get(SSTableReader sstable) { Descriptor descriptor = sstable.descriptor; Ref<GlobalTidy> refc = lookup.get(descriptor); if (refc != null) return refc.ref(); final GlobalTidy tidy = new GlobalTidy(sstable); refc = new Ref<>(tidy, tidy); Ref<?> ex = lookup.putIfAbsent(descriptor, refc); if (ex != null) { refc.close(); throw new AssertionError(); } return refc; } }
@SuppressWarnings("resource") public static Ref<GlobalTidy> get(SSTableReader sstable) { Descriptor descriptor = sstable.descriptor; Ref<GlobalTidy> refc = lookup.get(descriptor); if (refc != null) return refc.ref(); final GlobalTidy tidy = new GlobalTidy(sstable); refc = new Ref<>(tidy, tidy); Ref<?> ex = lookup.putIfAbsent(descriptor, refc); if (ex != null) { refc.close(); throw new AssertionError(); } return refc; } }
@SuppressWarnings("resource") public static Ref<GlobalTidy> get(SSTableReader sstable) { Descriptor descriptor = sstable.descriptor; Ref<GlobalTidy> refc = lookup.get(descriptor); if (refc != null) return refc.ref(); final GlobalTidy tidy = new GlobalTidy(sstable); refc = new Ref<>(tidy, tidy); Ref<?> ex = lookup.putIfAbsent(descriptor, refc); if (ex != null) { refc.close(); throw new AssertionError(); } return refc; } }
@SuppressWarnings("resource") public static Ref<GlobalTidy> get(SSTableReader sstable) { Descriptor descriptor = sstable.descriptor; Ref<GlobalTidy> refc = lookup.get(descriptor); if (refc != null) return refc.ref(); final GlobalTidy tidy = new GlobalTidy(sstable); refc = new Ref<>(tidy, tidy); Ref<?> ex = lookup.putIfAbsent(descriptor, refc); if (ex != null) { refc.close(); //throw new AssertionError(); } return refc; } }