From 9707861515fb1084ef51ec481f2cee1399bab85b Mon Sep 17 00:00:00 2001 From: "Zen.Liu" Date: Thu, 5 Mar 2020 00:41:21 +0800 Subject: [PATCH] pre of ignite fix1 --- .../ignite/{Ignite.kt => IgniteManager.kt} | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) rename ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/{Ignite.kt => IgniteManager.kt} (70%) diff --git a/ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/Ignite.kt b/ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/IgniteManager.kt similarity index 70% rename from ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/Ignite.kt rename to ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/IgniteManager.kt index 7f1f5fd..a266d56 100644 --- a/ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/Ignite.kt +++ b/ez-ignite/src/main/kotlin/cn/zenliu/ktor/features/ignite/IgniteManager.kt @@ -64,30 +64,12 @@ class IgniteManager { private val logger = LoggerFactory.getLogger(this::class.java) - //below are helpers - object group { - val cluster get() = ignite.cluster() - val remotes get() = cluster.forRemotes() - val random get() = cluster.forRandom() - val local get() = cluster.forLocal() - val oldest get() = cluster.forOldest() - val youngest get() = cluster.forYoungest() - val clients get() = cluster.forClients() - val servers get() = cluster.forServers() - val predict = { predict: (ClusterNode) -> Boolean -> - cluster.forPredicate(predict) - } - val attribute ={key:String,value:Any? -> - cluster.forAttribute(key,value) - } - //ext - val IgniteCluster.local get() = forLocal() - val IgniteCluster.remotes get() = forRemotes() - val IgniteCluster.random get() = forRandom() - val IgniteCluster.oldest get() = forOldest() - val IgniteCluster.youngest get() = forYoungest() - val IgniteCluster.clients get() = forClients() - val IgniteCluster.servers get() = forServers() - } + val IgniteCluster.local get() = forLocal() + val IgniteCluster.remotes get() = forRemotes() + val IgniteCluster.random get() = forRandom() + val IgniteCluster.oldest get() = forOldest() + val IgniteCluster.youngest get() = forYoungest() + val IgniteCluster.clients get() = forClients() + val IgniteCluster.servers get() = forServers() } }