Class: Google::Cloud::Memorystore::V1::PersistenceConfig

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/memorystore/v1/memorystore.rb

Overview

Represents persistence configuration for a instance.

Defined Under Namespace

Modules: PersistenceMode Classes: AOFConfig, RDBConfig

Instance Attribute Summary collapse

Instance Attribute Details

#aof_config::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig

Returns Optional. AOF configuration. This field will be ignored if mode is not AOF.

Returns:



847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'proto_docs/google/cloud/memorystore/v1/memorystore.rb', line 847

class PersistenceConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for RDB based persistence.
  # @!attribute [rw] rdb_snapshot_period
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig::SnapshotPeriod]
  #     Optional. Period between RDB snapshots.
  # @!attribute [rw] rdb_snapshot_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Optional. Time that the first snapshot was/will be attempted, and to
  #     which future snapshots will be aligned. If not provided, the current time
  #     will be used.
  class RDBConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible snapshot periods.
    module SnapshotPeriod
      # Not set.
      SNAPSHOT_PERIOD_UNSPECIFIED = 0

      # One hour.
      ONE_HOUR = 1

      # Six hours.
      SIX_HOURS = 2

      # Twelve hours.
      TWELVE_HOURS = 3

      # Twenty four hours.
      TWENTY_FOUR_HOURS = 4
    end
  end

  # Configuration for AOF based persistence.
  # @!attribute [rw] append_fsync
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig::AppendFsync]
  #     Optional. The fsync mode.
  class AOFConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible fsync modes.
    module AppendFsync
      # Not set. Default: EVERY_SEC
      APPEND_FSYNC_UNSPECIFIED = 0

      # Never fsync. Normally Linux will flush data every 30 seconds with this
      # configuration, but it's up to the kernel's exact tuning.
      NEVER = 1

      # Fsync every second. You may lose 1 second of data if there is a
      # disaster.
      EVERY_SEC = 2

      # Fsync every time new write commands are appended to the AOF. The best
      # data loss protection at the cost of performance.
      ALWAYS = 3
    end
  end

  # Possible persistence modes.
  module PersistenceMode
    # Not set.
    PERSISTENCE_MODE_UNSPECIFIED = 0

    # Persistence is disabled, and any snapshot data is deleted.
    DISABLED = 1

    # RDB based persistence is enabled.
    RDB = 2

    # AOF based persistence is enabled.
    AOF = 3
  end
end

#mode::Google::Cloud::Memorystore::V1::PersistenceConfig::PersistenceMode

Returns Optional. Current persistence mode.

Returns:



847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'proto_docs/google/cloud/memorystore/v1/memorystore.rb', line 847

class PersistenceConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for RDB based persistence.
  # @!attribute [rw] rdb_snapshot_period
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig::SnapshotPeriod]
  #     Optional. Period between RDB snapshots.
  # @!attribute [rw] rdb_snapshot_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Optional. Time that the first snapshot was/will be attempted, and to
  #     which future snapshots will be aligned. If not provided, the current time
  #     will be used.
  class RDBConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible snapshot periods.
    module SnapshotPeriod
      # Not set.
      SNAPSHOT_PERIOD_UNSPECIFIED = 0

      # One hour.
      ONE_HOUR = 1

      # Six hours.
      SIX_HOURS = 2

      # Twelve hours.
      TWELVE_HOURS = 3

      # Twenty four hours.
      TWENTY_FOUR_HOURS = 4
    end
  end

  # Configuration for AOF based persistence.
  # @!attribute [rw] append_fsync
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig::AppendFsync]
  #     Optional. The fsync mode.
  class AOFConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible fsync modes.
    module AppendFsync
      # Not set. Default: EVERY_SEC
      APPEND_FSYNC_UNSPECIFIED = 0

      # Never fsync. Normally Linux will flush data every 30 seconds with this
      # configuration, but it's up to the kernel's exact tuning.
      NEVER = 1

      # Fsync every second. You may lose 1 second of data if there is a
      # disaster.
      EVERY_SEC = 2

      # Fsync every time new write commands are appended to the AOF. The best
      # data loss protection at the cost of performance.
      ALWAYS = 3
    end
  end

  # Possible persistence modes.
  module PersistenceMode
    # Not set.
    PERSISTENCE_MODE_UNSPECIFIED = 0

    # Persistence is disabled, and any snapshot data is deleted.
    DISABLED = 1

    # RDB based persistence is enabled.
    RDB = 2

    # AOF based persistence is enabled.
    AOF = 3
  end
end

#rdb_config::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig

Returns Optional. RDB configuration. This field will be ignored if mode is not RDB.

Returns:



847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'proto_docs/google/cloud/memorystore/v1/memorystore.rb', line 847

class PersistenceConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration for RDB based persistence.
  # @!attribute [rw] rdb_snapshot_period
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig::SnapshotPeriod]
  #     Optional. Period between RDB snapshots.
  # @!attribute [rw] rdb_snapshot_start_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Optional. Time that the first snapshot was/will be attempted, and to
  #     which future snapshots will be aligned. If not provided, the current time
  #     will be used.
  class RDBConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible snapshot periods.
    module SnapshotPeriod
      # Not set.
      SNAPSHOT_PERIOD_UNSPECIFIED = 0

      # One hour.
      ONE_HOUR = 1

      # Six hours.
      SIX_HOURS = 2

      # Twelve hours.
      TWELVE_HOURS = 3

      # Twenty four hours.
      TWENTY_FOUR_HOURS = 4
    end
  end

  # Configuration for AOF based persistence.
  # @!attribute [rw] append_fsync
  #   @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig::AppendFsync]
  #     Optional. The fsync mode.
  class AOFConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Possible fsync modes.
    module AppendFsync
      # Not set. Default: EVERY_SEC
      APPEND_FSYNC_UNSPECIFIED = 0

      # Never fsync. Normally Linux will flush data every 30 seconds with this
      # configuration, but it's up to the kernel's exact tuning.
      NEVER = 1

      # Fsync every second. You may lose 1 second of data if there is a
      # disaster.
      EVERY_SEC = 2

      # Fsync every time new write commands are appended to the AOF. The best
      # data loss protection at the cost of performance.
      ALWAYS = 3
    end
  end

  # Possible persistence modes.
  module PersistenceMode
    # Not set.
    PERSISTENCE_MODE_UNSPECIFIED = 0

    # Persistence is disabled, and any snapshot data is deleted.
    DISABLED = 1

    # RDB based persistence is enabled.
    RDB = 2

    # AOF based persistence is enabled.
    AOF = 3
  end
end