【发布时间】:2018-02-22 01:15:57
【问题描述】:
为什么 Phantom-DSL 有 ContactPoints 和 ContactPoint 两种不同的连接器方式?
在使用 ContactPoint 时,我可以省略使用 host 或可以将 host 作为 String 但我必须声明端口在这里。
val default: CassandraConnection = ContactPoint(port).keySpace(keyspace)
但是在使用 ContactPoints 进行连接时,我必须将 host 声明为 Seq[String] 并且可以拥有或省略 port 在这里。
val default: CassandraConnection = ContactPoints(host).keySpace(keyspace)
除了我想的还有什么不同吗?
【问题讨论】:
标签: scala cassandra phantom-dsl phantom-types