public class InMemoryQueue extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InMemoryQueue.ConsumerState
The state of a single consumer, gets modified.
|
static class |
InMemoryQueue.Key
Used as the key of each queue item, composed of a transaction id and a sequence number within the transaction.
|
| Constructor and Description |
|---|
InMemoryQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(List<InMemoryQueue.Key> dequeuedKeys,
ConsumerConfig config) |
void |
clear() |
ImmutablePair<List<InMemoryQueue.Key>,List<byte[]>> |
dequeue(co.cask.tephra.Transaction tx,
ConsumerConfig config,
InMemoryQueue.ConsumerState consumerState,
int maxBatchSize) |
void |
enqueue(long txId,
int seqId,
QueueEntry entry) |
void |
evict(List<InMemoryQueue.Key> dequeuedKeys,
int numGroups) |
int |
getSize() |
void |
undoDequeue(List<InMemoryQueue.Key> dequeuedKeys,
ConsumerConfig config) |
void |
undoEnqueue(long txId,
int seqId) |
public void clear()
public int getSize()
public void enqueue(long txId,
int seqId,
QueueEntry entry)
public void undoEnqueue(long txId,
int seqId)
public ImmutablePair<List<InMemoryQueue.Key>,List<byte[]>> dequeue(co.cask.tephra.Transaction tx, ConsumerConfig config, InMemoryQueue.ConsumerState consumerState, int maxBatchSize)
public void ack(List<InMemoryQueue.Key> dequeuedKeys, ConsumerConfig config)
public void undoDequeue(List<InMemoryQueue.Key> dequeuedKeys, ConsumerConfig config)
public void evict(List<InMemoryQueue.Key> dequeuedKeys, int numGroups)
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.