Class: Prosody::StateDefinition
- Inherits:
-
Data
- Object
- Data
- Prosody::StateDefinition
- Defined in:
- sig/state.rbs,
lib/prosody/state.rb
Overview
Concrete immutable definition object returned by the constructor helpers.
Instance Attribute Summary collapse
-
#access ⇒ Object
readonly
Returns the value of attribute access.
-
#capacity ⇒ Object
readonly
Returns the value of attribute capacity.
-
#keyset_limit ⇒ Object
readonly
Returns the value of attribute keyset_limit.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#published ⇒ Object
readonly
Returns the value of attribute published.
-
#read_cache ⇒ Object
readonly
Returns the value of attribute read_cache.
-
#read_uncommitted ⇒ Object
readonly
Returns the value of attribute read_uncommitted.
-
#ttl_seconds ⇒ Object
readonly
Returns the value of attribute ttl_seconds.
Instance Method Summary collapse
-
#to_state_config ⇒ Hash
Serializes this definition into the native-registration hash, omitting unset optionals so they fall back to the core defaults.
Instance Attribute Details
#access ⇒ Object (readonly)
Returns the value of attribute access
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def access @access end |
#capacity ⇒ Object (readonly)
Returns the value of attribute capacity
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def capacity @capacity end |
#keyset_limit ⇒ Object (readonly)
Returns the value of attribute keyset_limit
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def keyset_limit @keyset_limit end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def name @name end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def payload @payload end |
#published ⇒ Object (readonly)
Returns the value of attribute published
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def published @published end |
#read_cache ⇒ Object (readonly)
Returns the value of attribute read_cache
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def read_cache @read_cache end |
#read_uncommitted ⇒ Object (readonly)
Returns the value of attribute read_uncommitted
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def read_uncommitted @read_uncommitted end |
#ttl_seconds ⇒ Object (readonly)
Returns the value of attribute ttl_seconds
60 61 62 |
# File 'lib/prosody/state.rb', line 60 def ttl_seconds @ttl_seconds end |
Instance Method Details
#to_state_config ⇒ Hash
Serializes this definition into the native-registration hash, omitting unset optionals so they fall back to the core defaults.
66 67 68 69 70 71 72 73 74 |
# File 'lib/prosody/state.rb', line 66 def to_state_config config = {name: name, kind: kind, payload: payload} config[:ttl_seconds] = ttl_seconds unless ttl_seconds.nil? config[:read_uncommitted] = read_uncommitted unless read_uncommitted.nil? config[:published] = published unless published.nil? config[:keyset_limit] = keyset_limit unless keyset_limit.nil? config[:capacity] = capacity unless capacity.nil? config end |