@Test @DisplayName("close delegate") void close() throws Exception { MemoizingStorageFactory factory = new MemoizingStorageFactory(); SystemAwareStorageFactory wrapped = SystemAwareStorageFactory.wrap(factory); assertFalse(factory.isClosed()); wrapped.close(); assertTrue(factory.isClosed()); }
@Override public void close() throws Exception { delegate.close(); }
SystemAwareStorageFactory implements StorageFactory { @Override public void close() throws Exception { delegate.close(); } }
SystemAwareStorageFactory implements StorageFactory { @Override public void close() throws Exception { delegate.close(); } private  SystemAwareStorageFactory(StorageFactory delegate); }
SystemAwareStorageFactory implements StorageFactory { @Override public void close() throws Exception { delegate.close(); } private  SystemAwareStorageFactory(StorageFactory delegate); static SystemAwareStorageFactory wrap(StorageFactory factory); @VisibleForTesting StorageFactory delegate(); @Override AggregateStorage<I> createAggregateStorage(ContextSpec context,
                           Class<? extends Aggregate<I, ?, ?>> aggregateClass); @Override RecordStorage<I> createRecordStorage(ContextSpec context, Class<? extends Entity<I, ?>> entityClass); @Override ProjectionStorage<I> createProjectionStorage(ContextSpec context,
                            Class<? extends Projection<I, ?, ?>> projectionClass); @Override InboxStorage createInboxStorage(boolean multitenant); @Override CatchUpStorage createCatchUpStorage(boolean multitenant); @Override EventStore createEventStore(ContextSpec context); @Override void close(); }
SystemAwareStorageFactory implements StorageFactory { @Override public void close() throws Exception { delegate.close(); } private  SystemAwareStorageFactory(StorageFactory delegate); static SystemAwareStorageFactory wrap(StorageFactory factory); @VisibleForTesting StorageFactory delegate(); @Override AggregateStorage<I> createAggregateStorage(ContextSpec context,
                           Class<? extends Aggregate<I, ?, ?>> aggregateClass); @Override RecordStorage<I> createRecordStorage(ContextSpec context, Class<? extends Entity<I, ?>> entityClass); @Override ProjectionStorage<I> createProjectionStorage(ContextSpec context,
                            Class<? extends Projection<I, ?, ?>> projectionClass); @Override InboxStorage createInboxStorage(boolean multitenant); @Override CatchUpStorage createCatchUpStorage(boolean multitenant); @Override EventStore createEventStore(ContextSpec context); @Override void close();  }