Skip to content

Commit

Permalink
pre of ignite fix1
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenLiuCN committed Mar 4, 2020
1 parent 287f489 commit 9707861
Showing 1 changed file with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

0 comments on commit 9707861

Please sign in to comment.