PendingStoreRequest(StoreRequest originalRequest, TopicMetadata topicMetadata) { super(originalRequest.getTopicId(), originalRequest.isTransactional(), originalRequest.getTransactionWritePointer()); this.originalRequest = originalRequest; this.metadata = topicMetadata; }
/** * Check whether the topic exists. */ public boolean exists() { return getGeneration() > 0; }
/** * Validates all the required properties of the given topic. * * @throws IllegalArgumentException if any required properties is missing or having invalid values */ private void validateProperties() { validateTTL(); validateGeneration(); }
@Override public void stop(CoprocessorEnvironment e) throws IOException { topicMetadataCacheSupplier.release(); }
/** * Convert byte array encoded with the {@link #toMetadataRowKey(TopicId)} method back to the {@link TopicId}. * Same as calling {@link #toTopicId(byte[], int, int)} with {@code offset = 0} * and {@code length = topicBytes.length}. * * @param topicBytes byte array which contains the representation of the topic id * @return {@link TopicId} */ public static TopicId toTopicId(byte[] topicBytes) { return toTopicId(topicBytes, 0, topicBytes.length); }
CacheMessageTableEntry(TopicMetadata topicMetadata, long publishTimestamp, short sequenceId) { this.lookupOnly = true; this.topicId = topicMetadata.getTopicId(); this.generation = topicMetadata.getGeneration(); this.transactional = false; this.payload = null; this.publishTimestamp = publishTimestamp; this.sequenceId = sequenceId; }
public TopicIdMetaKey(TopicId topicId) { this.topicId = topicId; this.key = MessagingUtils.toMetadataRowKey(topicId); }
@Override public TopicMetadataCache get() { return new TopicMetadataCache(env, cConfReader, hbaseNamespacePrefix, metadataTableNamespace, scanBuilder); } };
/** * Creates a new instance for the given topic with the associated properties. * * @param topicId topic id * @param properties a list of key/value pairs that will get converted into a {@link Map}. */ public TopicMetadata(TopicId topicId, Object...properties) { this(topicId, toMap(properties)); }
@Override public boolean hasPayload() { return originalRequest.hasPayload(); }
@Override public void stop(CoprocessorEnvironment e) throws IOException { topicMetadataCacheSupplier.release(); }
CacheMessageTableEntry(TopicMetadata topicMetadata, long publishTimestamp, short sequenceId) { this.lookupOnly = true; this.topicId = topicMetadata.getTopicId(); this.generation = topicMetadata.getGeneration(); this.transactional = false; this.payload = null; this.publishTimestamp = publishTimestamp; this.sequenceId = sequenceId; }
PendingStoreRequest(StoreRequest originalRequest, TopicMetadata topicMetadata) { super(originalRequest.getTopicId(), originalRequest.isTransactional(), originalRequest.getTransactionWritePointer()); this.originalRequest = originalRequest; this.metadata = topicMetadata; }
/** * Check whether the topic exists. */ public boolean exists() { return getGeneration() > 0; }
/** * Validates all the required properties of the given topic. * * @throws IllegalArgumentException if any required properties is missing or having invalid values */ private void validateProperties() { validateTTL(); validateGeneration(); }
@Override public TopicMetadataCache get() { return new TopicMetadataCache(env, cConfReader, hbaseNamespacePrefix, metadataTableNamespace, scanBuilder); } };
/** * Creates a new instance for the given topic with the associated properties. * * @param topicId topic id * @param properties a list of key/value pairs that will get converted into a {@link Map}. */ public TopicMetadata(TopicId topicId, Object...properties) { this(topicId, toMap(properties)); }
@Override public void stop(CoprocessorEnvironment e) throws IOException { topicMetadataCacheSupplier.release(); }
@Override public void stop(CoprocessorEnvironment e) throws IOException { topicMetadataCacheSupplier.release(); }
@Override public void stop(CoprocessorEnvironment e) throws IOException { topicMetadataCacheSupplier.release(); }