Class AgReplica


  • public final class AgReplica
    extends Object
    Availability group replica configuration.
    • Constructor Detail

      • AgReplica

        public AgReplica()
    • Method Detail

      • sqlVirtualMachineInstanceId

        public String sqlVirtualMachineInstanceId()
        Get the sqlVirtualMachineInstanceId property: Sql VirtualMachine Instance Id.
        Returns:
        the sqlVirtualMachineInstanceId value.
      • withSqlVirtualMachineInstanceId

        public AgReplica withSqlVirtualMachineInstanceId​(String sqlVirtualMachineInstanceId)
        Set the sqlVirtualMachineInstanceId property: Sql VirtualMachine Instance Id.
        Parameters:
        sqlVirtualMachineInstanceId - the sqlVirtualMachineInstanceId value to set.
        Returns:
        the AgReplica object itself.
      • role

        public Role role()
        Get the role property: Replica Role in availability group.
        Returns:
        the role value.
      • withRole

        public AgReplica withRole​(Role role)
        Set the role property: Replica Role in availability group.
        Parameters:
        role - the role value to set.
        Returns:
        the AgReplica object itself.
      • commit

        public Commit commit()
        Get the commit property: Replica commit mode in availability group.
        Returns:
        the commit value.
      • withCommit

        public AgReplica withCommit​(Commit commit)
        Set the commit property: Replica commit mode in availability group.
        Parameters:
        commit - the commit value to set.
        Returns:
        the AgReplica object itself.
      • failover

        public Failover failover()
        Get the failover property: Replica failover mode in availability group.
        Returns:
        the failover value.
      • withFailover

        public AgReplica withFailover​(Failover failover)
        Set the failover property: Replica failover mode in availability group.
        Parameters:
        failover - the failover value to set.
        Returns:
        the AgReplica object itself.
      • readableSecondary

        public ReadableSecondary readableSecondary()
        Get the readableSecondary property: Replica readable secondary mode in availability group.
        Returns:
        the readableSecondary value.
      • withReadableSecondary

        public AgReplica withReadableSecondary​(ReadableSecondary readableSecondary)
        Set the readableSecondary property: Replica readable secondary mode in availability group.
        Parameters:
        readableSecondary - the readableSecondary value to set.
        Returns:
        the AgReplica object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.