Made TcpConfig back immutable; Draw the borderline: Builders are mutable, Configs are immutable (hence ChronicleHashInstanceBuilder and StatelessClientBuilder renamed to Configs; improved TcpConfig static factory naming

This commit is contained in:
leventov
2014-11-07 12:24:52 +03:00
parent 4a51b129a3
commit 4c86dae04f
29 changed files with 198 additions and 215 deletions
@@ -340,7 +340,7 @@ public interface ChronicleHashBuilder<K, C extends ChronicleHash,
*
* @param replication the replication config
* @return this builder back
* @see ChronicleHashInstanceBuilder#replicated(SimpleReplication)
* @see ChronicleHashInstanceConfig#replicated(SimpleReplication)
* @see #replication(byte, TcpConfig)
*/
B replication(SimpleReplication replication);
@@ -353,13 +353,13 @@ public interface ChronicleHashBuilder<K, C extends ChronicleHash,
* @param tcpTransportAndNetwork configuration of tcp connection and network
* @return this builder back
* @see #replication(SimpleReplication)
* @see ChronicleHashInstanceBuilder#replicated(byte, TcpConfig)
* @see ChronicleHashInstanceConfig#replicated(byte, TcpConfig)
*/
B replication(byte identifier, TcpConfig tcpTransportAndNetwork);
StatelessClientBuilder<C> statelessClient(InetSocketAddress remoteAddress);
StatelessClientConfig<C> statelessClient(InetSocketAddress remoteAddress);
ChronicleHashInstanceBuilder<C> instance();
ChronicleHashInstanceConfig<C> instance();
/**
* Creates a new hash container, storing it's data in off-heap memory, not mapped to any file.
@@ -401,7 +401,7 @@ public interface ChronicleHashBuilder<K, C extends ChronicleHash,
* @see ChronicleHash#file()
* @see ChronicleHash#close()
* @see #create()
* @see ChronicleHashInstanceBuilder#persistedTo(File)
* @see ChronicleHashInstanceConfig#persistedTo(File)
*/
C createPersistedTo(File file) throws IOException;