mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-200 removed the isClosed ( and discussed with Roman why )
This commit is contained in:
@@ -33,20 +33,17 @@ final class CloseablesManager implements Closeable {
|
||||
private boolean isClosed = false;
|
||||
private final Set<Closeable> closeables = new LinkedHashSet<Closeable>();
|
||||
|
||||
private void checkState() {
|
||||
if (isClosed)
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
|
||||
public synchronized void add(Closeable closeable) {
|
||||
checkState();
|
||||
|
||||
if (closeable == null)
|
||||
throw new NullPointerException();
|
||||
closeables.add(closeable);
|
||||
}
|
||||
|
||||
public synchronized void close(Closeable closeable) throws IOException {
|
||||
checkState();
|
||||
|
||||
for (Iterator<Closeable> iterator = closeables.iterator(); iterator.hasNext(); ) {
|
||||
if (iterator.next() == closeable)
|
||||
iterator.remove();
|
||||
|
||||
@@ -76,7 +76,9 @@ final class TcpReplicator extends AbstractChannelReplicator implements Closeable
|
||||
private final Replica.EntryExternalizable externalizable;
|
||||
private final TcpTransportAndNetworkConfig replicationConfig;
|
||||
private final StatelessServerConnector statelessServerConnector;
|
||||
private final @Nullable RemoteNodeValidator remoteNodeValidator;
|
||||
private final
|
||||
@Nullable
|
||||
RemoteNodeValidator remoteNodeValidator;
|
||||
|
||||
private long selectorTimeout;
|
||||
|
||||
@@ -1794,7 +1796,7 @@ class StatelessServerConnector<K, V> {
|
||||
/**
|
||||
* write the keysize and the key to the the {@code target} buffer
|
||||
*
|
||||
* @param key the key of the map
|
||||
* @param key the key of the map
|
||||
*/
|
||||
|
||||
private void writeKey(K key, Bytes writer, final ThreadLocalCopies local) {
|
||||
|
||||
Reference in New Issue
Block a user