- public CacheEntry(final T source, final SchemaSourceRegistration<T> reg) {
- this.source = Preconditions.checkNotNull(source);
- this.reg = Preconditions.checkNotNull(reg);
- }
- }
-
- private static final RemovalListener<SourceIdentifier, CacheEntry<?>> LISTENER = new RemovalListener<SourceIdentifier, CacheEntry<?>>() {
- @Override
- public void onRemoval(final RemovalNotification<SourceIdentifier, CacheEntry<?>> notification) {
- notification.getValue().reg.close();
- }
- };
-
- private final Cache<SourceIdentifier, CacheEntry<T>> cache;
-
- protected InMemorySchemaSourceCache(final SchemaSourceRegistry consumer, final Class<T> representation, final CacheBuilder<Object, Object> builder) {
+ protected InMemorySchemaSourceCache(final SchemaSourceRegistry consumer, final Class<T> representation,
+ final CacheBuilder<Object, Object> builder) {