Minor API cleanups

This commit is contained in:
leventov
2014-11-07 16:37:27 +03:00
parent 49172e4b3b
commit 8d64a6f8e8
11 changed files with 43 additions and 24 deletions
@@ -0,0 +1,31 @@
/*
* Copyright 2014 Higher Frequency Trading
*
* http://www.higherfrequencytrading.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.openhft.chronicle.map;
import java.io.IOException;
/**
* @author Rob Austin.
*/
class IORuntimeException extends RuntimeException{
public IORuntimeException(IOException e) {
super(e);
}
}
@@ -222,7 +222,7 @@ public class NodeDiscovery {
knownNodes.add(ourAddressAndPort, identifier);
final TcpConfig tcpConfig = TcpConfig
.unknownTopology(ourAddressAndPort.getPort(),
.forUnknownTopology(ourAddressAndPort.getPort(),
toInetSocketCollection(knownHostPorts))
.heartBeatInterval(1, SECONDS)
.nonUniqueIdentifierListener(identifierListener);
@@ -19,8 +19,7 @@
package net.openhft.chronicle.map;
import com.sun.jdi.connect.spi.ClosedConnectionException;
import net.openhft.chronicle.hash.exceptions.IORuntimeException;
import net.openhft.chronicle.hash.exceptions.TimeoutRuntimeException;
import net.openhft.chronicle.hash.RemoteCallTimeoutException;
import net.openhft.lang.io.ByteBufferBytes;
import net.openhft.lang.io.Bytes;
import net.openhft.lang.threadlocal.ThreadLocalCopies;
@@ -942,7 +941,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
private void checkTimeout(long timeoutTime) {
if (timeoutTime < System.currentTimeMillis())
throw new TimeoutRuntimeException();
throw new RemoteCallTimeoutException();
}
private void writeSizeAndTransactionIdAt(long locationOfSize, final long transactionId) {