mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-167 when running the profile I found that we were not closing every connection, so no being super fussy about adding everything to closable.
This commit is contained in:
@@ -21,15 +21,15 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
final class CloseablesManager implements Closeable {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CloseablesManager.class.getName());
|
||||
|
||||
private boolean isClosed = false;
|
||||
private final List<Closeable> closeables = new ArrayList<Closeable>();
|
||||
private final Set<Closeable> closeables = new HashSet<Closeable>();
|
||||
|
||||
private void checkState() {
|
||||
if (isClosed)
|
||||
|
||||
Reference in New Issue
Block a user