Class VersionedData

  • All Implemented Interfaces:
    org.apache.solr.common.MapSerializable, org.apache.solr.common.MapWriter, org.apache.solr.common.NavigableObject

    public class VersionedData
    extends Object
    implements org.apache.solr.common.MapWriter
    Immutable representation of binary data with version.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

        org.apache.solr.common.MapWriter.EntryWriter
    • Field Summary

      • Fields inherited from interface org.apache.solr.common.MapWriter

        EMPTY
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionedData​(int version, byte[] data, org.apache.zookeeper.CreateMode mode, String owner)
      Constructor.
    • Constructor Detail

      • VersionedData

        public VersionedData​(int version,
                             byte[] data,
                             org.apache.zookeeper.CreateMode mode,
                             String owner)
        Constructor.
        Parameters:
        version - version of the data, or -1 if unknown
        data - binary data, or null.
        mode - create mode
        owner - symbolic identifier of data owner / creator, or null.
    • Method Detail

      • getVersion

        public int getVersion()
      • getData

        public byte[] getData()
      • getMode

        public org.apache.zookeeper.CreateMode getMode()
      • getOwner

        public String getOwner()
      • writeMap

        public void writeMap​(org.apache.solr.common.MapWriter.EntryWriter ew)
                      throws IOException
        Specified by:
        writeMap in interface org.apache.solr.common.MapWriter
        Throws:
        IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object