Package co.cask.tigon.data.queue

Examples of co.cask.tigon.data.queue.QueueConsumer


  }

  @Override
  public QueueConsumer createConsumer(QueueName queueName,
                                       ConsumerConfig consumerConfig, int numGroups) throws IOException {
    QueueConsumer consumer = queueClientFactory.createConsumer(queueName, consumerConfig, numGroups);
    if (consumer instanceof TransactionAware) {
      consumer = new CloseableQueueConsumer(this, consumer);
      txAware.add((TransactionAware) consumer);
    }
    return consumer;
View Full Code Here


    };
  }

  @Override
  public InputDatum<T> tryDequeue(long timeout, TimeUnit timeoutUnit) throws IOException {
    QueueConsumer consumer = consumerSupplier.get();
    return new BasicInputDatum<byte[], T>(consumer.getQueueName(), consumer.dequeue(batchSize), decoder);
  }
View Full Code Here

                                    groupSize,
                                    consumerConfig.getDequeueStrategy(),
                                    consumerConfig.getHashKey());
      }
      if (queueName.isQueue()) {
        QueueConsumer queueConsumer = dataFabricFacade.createConsumer(queueName, config, numGroups);
        consumerConfig = queueConsumer.getConfig();
        consumer = queueConsumer;
      }
    } catch (Exception e) {
      throw Throwables.propagate(e);
    }
View Full Code Here

TOP

Related Classes of co.cask.tigon.data.queue.QueueConsumer

Copyright © 2018 www.massapicom. 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.