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

redis.clients.jedis.resps.StreamEntry Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis.resps;

import java.io.IOException;
import java.io.Serializable;
import java.util.Map;
import redis.clients.jedis.StreamEntryID;

public class StreamEntry implements Serializable {

  private static final long serialVersionUID = 1L;

  private StreamEntryID id;
  private Map fields;

  public StreamEntry(StreamEntryID id, Map fields) {
    this.id = id;
    this.fields = fields;
  }

  public StreamEntryID getID() {
    return id;
  }

  public Map getFields() {
    return fields;
  }

  @Override
  public String toString() {
    return id + " " + fields;
  }

  private void writeObject(java.io.ObjectOutputStream out) throws IOException {
    out.writeUnshared(this.id);
    out.writeUnshared(this.fields);
  }

  private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
    this.id = (StreamEntryID) in.readUnshared();
    this.fields = (Map) in.readUnshared();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy