Class TopologyVersion


  • @ThreadSafe
    public final class TopologyVersion
    extends Object
    The topology version of a cluster.
    Since:
    4.1
    Since server release
    4.4
    • Constructor Detail

      • TopologyVersion

        public TopologyVersion​(BsonDocument topologyVersionDocument)
        Construct a new instance from a document description
        Parameters:
        topologyVersionDocument - a document description of the topology version
      • TopologyVersion

        public TopologyVersion​(ObjectId processId,
                               long counter)
        Construct a new instance from process identifier and counter
        Parameters:
        processId - the process identifer
        counter - the counter
    • Method Detail

      • getProcessId

        public ObjectId getProcessId()
        Get the process identifier
        Returns:
        the process identifier
      • getCounter

        public long getCounter()
        Get the counter
        Returns:
        the counter
      • asDocument

        public BsonDocument asDocument()
        Get the document representation of the topology version
        Returns:
        the document representation of the topology version
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object