Sha256: 36fa26408e47846c7630a5fab3bb316e0da3c0767bf441bf7a48c54ace09886a

Contents?: true

Size: 561 Bytes

Versions: 11

Compression:

Stored size: 561 Bytes

Contents

require 'active_record'
require 'rflow/configuration/uuid_keyed'

class RFlow
  class Configuration
    class Shard < ConfigurationItem
      include UUIDKeyed
      include ActiveModel::Validations

      class ShardInvalid < StandardError; end

      has_many :components, :primary_key => 'uuid', :foreign_key => 'shard_uuid'

      validates_uniqueness_of :name
      validates_numericality_of :count, :only_integer => true, :greater_than => 0
    end

    # STI-based classes
    class ProcessShard < Shard; end
    class ThreadShard < Shard; end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rflow-1.3.0 lib/rflow/configuration/shard.rb
rflow-1.3.0a1 lib/rflow/configuration/shard.rb
rflow-1.2.0 lib/rflow/configuration/shard.rb
rflow-1.1.0 lib/rflow/configuration/shard.rb
rflow-1.0.1 lib/rflow/configuration/shard.rb
rflow-1.0.0 lib/rflow/configuration/shard.rb
rflow-1.0.0a6 lib/rflow/configuration/shard.rb
rflow-1.0.0a5 lib/rflow/configuration/shard.rb
rflow-1.0.0a4 lib/rflow/configuration/shard.rb
rflow-1.0.0a3 lib/rflow/configuration/shard.rb
rflow-1.0.0a2 lib/rflow/configuration/shard.rb