Class: Omnizip::Models::ParallelOptions
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Omnizip::Models::ParallelOptions
- Includes:
- AttributeApply
- Defined in:
- lib/omnizip/models/parallel_options.rb
Overview
Model for parallel processing configuration
Stores settings for parallel compression and extraction operations including thread count, queue size, and load balancing strategy.
Serialized via lutaml-model — no hand-rolled to_h / to_json.
Instance Method Summary collapse
-
#batch_size ⇒ Integer
Batch size for work queue polling.
-
#chunk_size ⇒ Integer
Chunk size for chunked operations in bytes.
-
#queue_size ⇒ Integer
Maximum size of job queue (default: 1000).
-
#strategy ⇒ Symbol
Load balancing strategy (:dynamic or :static).
-
#threads ⇒ Integer
Number of worker threads (default: auto-detect).
-
#validate_options! ⇒ Boolean
Validate options.
-
#verbose ⇒ Boolean
Enable verbose progress output.
Methods included from AttributeApply
Instance Method Details
#batch_size ⇒ Integer
Returns Batch size for work queue polling.
41 |
# File 'lib/omnizip/models/parallel_options.rb', line 41 attribute :batch_size, :integer, default: 10 |
#chunk_size ⇒ Integer
Returns Chunk size for chunked operations in bytes.
32 |
# File 'lib/omnizip/models/parallel_options.rb', line 32 attribute :chunk_size, :integer, default: 64 * 1024 * 1024 |
#queue_size ⇒ Integer
Returns Maximum size of job queue (default: 1000).
29 |
# File 'lib/omnizip/models/parallel_options.rb', line 29 attribute :queue_size, :integer, default: 1000 |
#strategy ⇒ Symbol
Returns Load balancing strategy (:dynamic or :static).
35 |
# File 'lib/omnizip/models/parallel_options.rb', line 35 attribute :strategy, :symbol, default: :dynamic |
#threads ⇒ Integer
Returns Number of worker threads (default: auto-detect).
26 |
# File 'lib/omnizip/models/parallel_options.rb', line 26 attribute :threads, :integer, default: -> { detect_cpu_count } |
#validate_options! ⇒ Boolean
Validate options
Named validate_options! rather than validate! so it does not
shadow Lutaml::Model::Validation#validate!(register:).
62 63 64 65 66 67 68 69 70 |
# File 'lib/omnizip/models/parallel_options.rb', line 62 def validate_positive(:threads) validate_positive(:queue_size) validate_positive(:chunk_size) validate_strategy validate_positive(:batch_size) true end |
#verbose ⇒ Boolean
Returns Enable verbose progress output.
38 |
# File 'lib/omnizip/models/parallel_options.rb', line 38 attribute :verbose, :boolean, default: false |