public override BoltScheduler Get(BoltChannel channel)
        {
            BoltScheduler boltScheduler = _boltSchedulers[channel.Connector()];

            if (boltScheduler == null)
            {
                throw new System.ArgumentException(string.Format("Provided channel instance [local: {0}, remote: {1}] is not bound to any known bolt listen addresses.", channel.ServerAddress(), channel.ClientAddress()));
            }

            return(boltScheduler);
        }
 public override BoltStateMachine NewStateMachine(long protocolVersion, BoltChannel boltChannel)
 {
     if (protocolVersion == BoltProtocolV1.VERSION || protocolVersion == BoltProtocolV2.VERSION)
     {
         return(NewStateMachineV1(boltChannel));
     }
     else if (protocolVersion == BoltProtocolV3.VERSION)
     {
         return(NewStateMachineV3(boltChannel));
     }
     else
     {
         throw new System.ArgumentException("Failed to create a state machine for protocol version " + protocolVersion);
     }
 }