All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tanukkii.reactivezk.StatCallbackConversion.scala Maven / Gradle / Ivy

The newest version!
package tanukkii.reactivezk

import org.apache.zookeeper.AsyncCallback.StatCallback
import org.apache.zookeeper.data.Stat

trait StatCallbackConversion {
  implicit def toStatCallback[Ctx](f: (Int, String, Ctx, Stat) => Unit): StatCallback = new StatCallback {
    def processResult(rc: Int, path: String, ctx: Any, stat: Stat): Unit = f(rc, path, ctx.asInstanceOf[Ctx], stat)
  }
}

object StatCallbackConversion extends StatCallbackConversion




© 2015 - 2024 Weber Informatics LLC | Privacy Policy