Class NodeAllocationResult.ShardStoreInfo

    • Constructor Detail

      • ShardStoreInfo

        public ShardStoreInfo​(java.lang.String allocationId,
                              boolean inSync,
                              java.lang.Exception storeException)
      • ShardStoreInfo

        public ShardStoreInfo​(long matchingBytes)
      • ShardStoreInfo

        public ShardStoreInfo​(StreamInput in)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • isInSync

        public boolean isInSync()
        Returns true if the shard copy is in-sync and contains the latest data. Returns false if the shard copy is stale or if the shard copy being examined is for a replica shard allocation.
      • getAllocationId

        @Nullable
        public java.lang.String getAllocationId()
        Gets the allocation id for the shard copy, if it exists.
      • hasMatchingSyncId

        public boolean hasMatchingSyncId()
        Returns true if the shard copy has a matching sync id with the primary shard. Returns false if the shard copy does not have a matching sync id with the primary shard, or this explanation pertains to the allocation of a primary shard, in which case matching sync ids are irrelevant.
      • getMatchingBytes

        public long getMatchingBytes()
        Gets the number of matching bytes the shard copy has with the primary shard. Returns Long.MAX_VALUE if hasMatchingSyncId() returns true. Returns -1 if not applicable (this value only applies to assigning replica shards).
      • getStoreException

        @Nullable
        public java.lang.Exception getStoreException()
        Gets the store exception when trying to read the store, if there was an error. If there was no error, returns null.