@Override public synchronized Map<String, String> getProperties() { if (this.properties == null) { if (msgMetadataBuilder.getPropertiesCount() > 0) { this.properties = Collections.unmodifiableMap(msgMetadataBuilder.getPropertiesList().stream() .collect(Collectors.toMap(KeyValue::getKey, KeyValue::getValue))); } else { this.properties = Collections.emptyMap(); } } return this.properties; }
@Override public synchronized Map<String, String> getProperties() { if (this.properties == null) { if (msgMetadataBuilder.getPropertiesCount() > 0) { this.properties = Collections.unmodifiableMap(msgMetadataBuilder.getPropertiesList().stream() .collect(Collectors.toMap(KeyValue::getKey, KeyValue::getValue))); } else { this.properties = Collections.emptyMap(); } } return this.properties; }
public final boolean isInitialized() { if (!hasProducerName()) { return false; } if (!hasSequenceId()) { return false; } if (!hasPublishTime()) { return false; } for (int i = 0; i < getPropertiesCount(); i++) { if (!getProperties(i).isInitialized()) { return false; } } for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { return false; } } return true; }
public final boolean isInitialized() { if (!hasProducerName()) { return false; } if (!hasSequenceId()) { return false; } if (!hasPublishTime()) { return false; } for (int i = 0; i < getPropertiesCount(); i++) { if (!getProperties(i).isInitialized()) { return false; } } for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { return false; } } return true; }