Class: Appwrite::Models::DedicatedDatabasePooler
- Inherits:
-
Object
- Object
- Appwrite::Models::DedicatedDatabasePooler
- Defined in:
- lib/appwrite/models/dedicated_database_pooler.rb
Instance Attribute Summary collapse
-
#default_pool_size ⇒ Object
readonly
Returns the value of attribute default_pool_size.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#max_connections ⇒ Object
readonly
Returns the value of attribute max_connections.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#pooler_cpu_limit ⇒ Object
readonly
Returns the value of attribute pooler_cpu_limit.
-
#pooler_cpu_request ⇒ Object
readonly
Returns the value of attribute pooler_cpu_request.
-
#pooler_memory_limit ⇒ Object
readonly
Returns the value of attribute pooler_memory_limit.
-
#pooler_memory_request ⇒ Object
readonly
Returns the value of attribute pooler_memory_request.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#read_write_splitting ⇒ Object
readonly
Returns the value of attribute read_write_splitting.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled:, mode:, max_connections:, default_pool_size:, port:, read_write_splitting:, pooler_cpu_request:, pooler_cpu_limit:, pooler_memory_request:, pooler_memory_limit:) ⇒ DedicatedDatabasePooler
constructor
A new instance of DedicatedDatabasePooler.
- #to_map ⇒ Object
Constructor Details
#initialize(enabled:, mode:, max_connections:, default_pool_size:, port:, read_write_splitting:, pooler_cpu_request:, pooler_cpu_limit:, pooler_memory_request:, pooler_memory_limit:) ⇒ DedicatedDatabasePooler
Returns a new instance of DedicatedDatabasePooler.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 17 def initialize( enabled:, mode:, max_connections:, default_pool_size:, port:, read_write_splitting:, pooler_cpu_request:, pooler_cpu_limit:, pooler_memory_request:, pooler_memory_limit: ) @enabled = enabled @mode = mode @max_connections = max_connections @default_pool_size = default_pool_size @port = port @read_write_splitting = read_write_splitting @pooler_cpu_request = pooler_cpu_request @pooler_cpu_limit = pooler_cpu_limit @pooler_memory_request = pooler_memory_request @pooler_memory_limit = pooler_memory_limit end |
Instance Attribute Details
#default_pool_size ⇒ Object (readonly)
Returns the value of attribute default_pool_size.
9 10 11 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 9 def default_pool_size @default_pool_size end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
6 7 8 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 6 def enabled @enabled end |
#max_connections ⇒ Object (readonly)
Returns the value of attribute max_connections.
8 9 10 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 8 def max_connections @max_connections end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
7 8 9 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 7 def mode @mode end |
#pooler_cpu_limit ⇒ Object (readonly)
Returns the value of attribute pooler_cpu_limit.
13 14 15 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 13 def pooler_cpu_limit @pooler_cpu_limit end |
#pooler_cpu_request ⇒ Object (readonly)
Returns the value of attribute pooler_cpu_request.
12 13 14 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 12 def pooler_cpu_request @pooler_cpu_request end |
#pooler_memory_limit ⇒ Object (readonly)
Returns the value of attribute pooler_memory_limit.
15 16 17 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 15 def pooler_memory_limit @pooler_memory_limit end |
#pooler_memory_request ⇒ Object (readonly)
Returns the value of attribute pooler_memory_request.
14 15 16 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 14 def pooler_memory_request @pooler_memory_request end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
10 11 12 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 10 def port @port end |
#read_write_splitting ⇒ Object (readonly)
Returns the value of attribute read_write_splitting.
11 12 13 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 11 def read_write_splitting @read_write_splitting end |
Class Method Details
.from(map:) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 41 def self.from(map:) map = { "enabled" => false, "mode" => "transaction", "maxConnections" => 100, "defaultPoolSize" => 20, "port" => 6432, "readWriteSplitting" => false, "poolerCpuRequest" => "", "poolerCpuLimit" => "", "poolerMemoryRequest" => "", "poolerMemoryLimit" => "" }.merge(map) DedicatedDatabasePooler.new( enabled: map["enabled"], mode: map["mode"], max_connections: map["maxConnections"], default_pool_size: map["defaultPoolSize"], port: map["port"], read_write_splitting: map["readWriteSplitting"], pooler_cpu_request: map["poolerCpuRequest"], pooler_cpu_limit: map["poolerCpuLimit"], pooler_memory_request: map["poolerMemoryRequest"], pooler_memory_limit: map["poolerMemoryLimit"] ) end |
Instance Method Details
#to_map ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/appwrite/models/dedicated_database_pooler.rb', line 57 def to_map { "enabled": @enabled, "mode": @mode, "maxConnections": @max_connections, "defaultPoolSize": @default_pool_size, "port": @port, "readWriteSplitting": @read_write_splitting, "poolerCpuRequest": @pooler_cpu_request, "poolerCpuLimit": @pooler_cpu_limit, "poolerMemoryRequest": @pooler_memory_request, "poolerMemoryLimit": @pooler_memory_limit } end |