Skip to content
Permalink
Browse files

Address deprecations (#330)

  • Loading branch information...
alexarchambault committed Mar 8, 2019
1 parent 548dc10 commit 251f4237b47cb8a2adae83ee5ab08354c756ad6d
@@ -7,7 +7,7 @@ import almond.channels._
import almond.logger.LoggerContext
import cats.effect.IO
import cats.syntax.apply._
import org.zeromq.ZMQ
import org.zeromq.{SocketType, ZMQ}
import org.zeromq.ZMQ.{PollItem, Poller}

import scala.concurrent.duration.Duration
@@ -26,17 +26,17 @@ final class ZeromqConnection(
private val log = logCtx(getClass)

private def routerDealer =
if (bind) ZMQ.ROUTER
else ZMQ.DEALER
if (bind) SocketType.ROUTER
else SocketType.DEALER
private def inverseRouterDealer =
if (bind) ZMQ.DEALER
else ZMQ.ROUTER
if (bind) SocketType.DEALER
else SocketType.ROUTER
private def pubSub =
if (bind) ZMQ.PUB
else ZMQ.SUB
if (bind) SocketType.PUB
else SocketType.SUB
private def repReq =
if (bind) ZMQ.REP
else ZMQ.REQ
if (bind) SocketType.REP
else SocketType.REQ

private val requests0 = ZeromqSocket(
threads.ecs(Channel.Requests),
@@ -4,7 +4,7 @@ import almond.channels.Message
import almond.logger.LoggerContext
import almond.util.Secret
import cats.effect.IO
import org.zeromq.ZMQ
import org.zeromq.{SocketType, ZMQ}

import scala.concurrent.ExecutionContext

@@ -25,7 +25,7 @@ object ZeromqSocket {
*/
def apply(
ec: ExecutionContext,
socketType: Int,
socketType: SocketType,
bind: Boolean,
uri: String,
identityOpt: Option[Array[Byte]],
@@ -9,14 +9,14 @@ import cats.effect.IO
import cats.syntax.apply._
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import org.zeromq.ZMQ
import org.zeromq.{SocketType, ZMQ}

import scala.concurrent.ExecutionContext
import scala.util.Try

final class ZeromqSocketImpl(
ec: ExecutionContext,
socketType: Int,
socketType: SocketType,
bind: Boolean,
uri: String,
identityOpt: Option[Array[Byte]],
@@ -5,7 +5,7 @@ import java.util.concurrent.Executors
import almond.channels.{ConnectionParameters, Message}
import almond.logger.LoggerContext
import almond.util.Secret
import org.zeromq.ZMQ
import org.zeromq.{SocketType, ZMQ}
import utest._

import scala.concurrent.ExecutionContext
@@ -36,7 +36,7 @@ object ZeromqSocketTests extends TestSuite {

val rep = ZeromqSocket(
repEc,
ZMQ.REP,
SocketType.REP,
bind = true,
s"tcp://localhost:$port",
None,
@@ -49,7 +49,7 @@ object ZeromqSocketTests extends TestSuite {

val req = ZeromqSocket(
reqEc,
ZMQ.REQ,
SocketType.REQ,
bind = false,
s"tcp://localhost:$port",
None,
@@ -99,7 +99,7 @@ object ZeromqSocketTests extends TestSuite {

val rep = ZeromqSocket(
repEc,
ZMQ.REP,
SocketType.REP,
bind = true,
s"tcp://localhost:$port",
None,
@@ -112,7 +112,7 @@ object ZeromqSocketTests extends TestSuite {

val req = ZeromqSocket(
reqEc,
ZMQ.REQ,
SocketType.REQ,
bind = false,
s"tcp://localhost:$port",
None,

0 comments on commit 251f423

Please sign in to comment.
You can’t perform that action at this time.