Examples of ChannelID


Examples of org.apache.flink.runtime.io.network.channels.ChannelID

    if (!receiverList.hasLocalReceiver() || receiverList.hasRemoteReceiver()) {
      throw new IOException("The destination to be looked up is not a single local endpoint.");
    }
   

    ChannelID localReceiver = receiverList.getLocalReceiver();
    Channel channel = this.channels.get(localReceiver);
   
    if (channel == null) {
      // receiver is already canceled
      return this.discardBufferPool;
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

  private Envelope nextEnvelope(boolean withBuffer) {
    return nextEnvelope(withBuffer, false);
  }

  private Envelope nextEnvelope(int bufferSize, AbstractEvent... events) {
    Envelope env = new Envelope(random.nextInt(), new JobID(), new ChannelID());
    if (bufferSize > 0) {
      byte[] data = new byte[bufferSize];
      random.nextBytes(data);

      env.setBuffer(spy(new Buffer(new MemorySegment(data), bufferSize, RECYCLER)));
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

    for (int i = 0; i < numSubtasks; i++) {
      final RemoteReceiver receiver = receivers[random.nextInt(numChannels)];

      final AtomicInteger seqNum = new AtomicInteger(0);
      final JobID jobId = new JobID();
      final ChannelID channelId = new ChannelID();

      new Thread(new Runnable() {
        @Override
        public void run() {
          // enqueue envelopes with ascending seq numbers
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

    @Override
    public Void answer(InvocationOnMock invocation) throws Throwable {
      Envelope env = (Envelope) invocation.getArguments()[0];

      ChannelID channelId = env.getSource();
      int seqNum = env.getSequenceNumber();

      if (seqNum == 0) {
        Integer previousSeqNum = this.received.putIfAbsent(channelId, seqNum);
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

    final EmbeddedChannel channel = new EmbeddedChannel(new OutboundEnvelopeEncoder());

    int numBuffers = 0;
    for (int i = 0; i < NUM_RANDOM_ENVELOPES; i++) {
      Envelope env = new Envelope(i, new JobID(), new ChannelID());
      int expectedEncodedMsgSize = OutboundEnvelopeEncoder.HEADER_SIZE;

      if (random.nextBoolean()) {
        int eventsSize = random.nextInt(MAX_EVENTS_SIZE + 1);
        expectedEncodedMsgSize += eventsSize;
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

    if (in.readBoolean()) {
      this.remoteTarget = new RemoteReceiver();
      this.remoteTarget.read(in);
    }
    if (in.readBoolean()) {
      this.localTarget = new ChannelID();
      this.localTarget.read(in);
    }
  }
View Full Code Here

Examples of org.apache.flink.runtime.io.network.channels.ChannelID

  /**
   * Default constructor for serialization/deserialization.
   */
  public ChannelDeploymentDescriptor() {
    this.outputChannelID = new ChannelID();
    this.inputChannelID = new ChannelID();
  }
View Full Code Here

Examples of org.cometd.bayeux.ChannelId

    public ChannelId newChannelId(String id)
    {
        ServerChannelImpl channel = _channels.get(id);
        if (channel != null)
            return channel.getChannelId();
        return new ChannelId(id);
    }
View Full Code Here

Examples of org.cometd.bayeux.ChannelId

    {
        boolean initialized = false;
        ServerChannelImpl channel = _channels.get(channelName);
        if (channel == null)
        {
            ChannelId channelId = new ChannelId(channelName);
            ServerChannelImpl candidate = new ServerChannelImpl(this, channelId);
            channel = _channels.putIfAbsent(channelName, candidate);
            if (channel == null)
            {
                // My candidate channel was added to the map, so I'd better initialize it
View Full Code Here

Examples of org.cometd.bayeux.ChannelId

        if (_policy != null && !_policy.canCreate(BayeuxServerImpl.this, session, channel, message))
        {
            _logger.warn("{} denied Create@{} by {}", session, message.getChannel(), _policy);
            return Authorizer.Result.deny("denied_by_security_policy");
        }
        return isOperationAuthorized(Authorizer.Operation.CREATE, session, message, new ChannelId(channel));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.