All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.datahub.client.model.RecordEntry Maven / Gradle / Ivy

There is a newer version: 2.25.6
Show newest version
package com.aliyun.datahub.client.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.HashMap;
import java.util.Map;

public class RecordEntry {
    @JsonProperty("ShardId")
    private String shardId;

    @JsonProperty("PartitionKey")
    private String partitionKey;

    @JsonProperty("HashKey")
    private String hashKey;

    private long systemTime;

    private long sequence;

    @JsonProperty("Cursor")
    private String cursor;

    @JsonProperty("NextCursor")
    private String nextCursor;

    @JsonProperty("Attributes")
    private Map attributes;

    @JsonProperty("Data")
    private RecordData recordData;

    public void addAttribute(String key, String value) {
        if (attributes == null) {
            attributes = new HashMap<>();
        }
        attributes.put(key, value);
    }

    public String getShardId() {
        return shardId;
    }

    public void setShardId(String shardId) {
        this.shardId = shardId;
    }

    public String getPartitionKey() {
        return partitionKey;
    }

    public void setPartitionKey(String partitionKey) {
        this.partitionKey = partitionKey;
    }

    public String getHashKey() {
        return hashKey;
    }

    public void setHashKey(String hashKey) {
        this.hashKey = hashKey;
    }

    @JsonIgnore
    public long getSystemTime() {
        return systemTime;
    }

    @JsonProperty("SystemTime")
    public void setSystemTime(long systemTime) {
        this.systemTime = systemTime;
    }

    @JsonIgnore
    public long getSequence() {
        return sequence;
    }

    @JsonProperty("Sequence")
    public void setSequence(long sequence) {
        this.sequence = sequence;
    }

    public String getCursor() {
        return cursor;
    }

    public void setCursor(String cursor) {
        this.cursor = cursor;
    }

    public String getNextCursor() {
        return nextCursor;
    }

    public void setNextCursor(String nextCursor) {
        this.nextCursor = nextCursor;
    }

    public Map getAttributes() {
        return attributes;
    }

    public void setAttributes(Map attributes) {
        this.attributes = attributes;
    }

    public RecordData getRecordData() {
        return recordData;
    }

    public void setRecordData(RecordData recordData) {
        this.recordData = recordData;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy