Class: Concurrent::Edge::LockFreeLinkedSet::Tail
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
self,
Node ,
Comparable,
Synchronization::Object ,
Synchronization::Volatile ,
Synchronization::AbstractObject
|
|
Inherits: |
Concurrent::Edge::LockFreeLinkedSet::Node
|
Defined in: | lib/concurrent-ruby-edge/concurrent/edge/lock_free_linked_set/node.rb |
Overview
Internal sentinel node for the Tail
. It is always greater than all other nodes, and it is self-referential; meaning its successor is a self-loop.
Class Attribute Summary
Synchronization::Object
- Inherited
Class Method Summary
- .new(_data = nil, _succ = nil) ⇒ Tail constructor
Node
- Inherited
Synchronization::Object
- Inherited
.atomic_attribute?, .atomic_attributes, | |
.attr_atomic | Creates methods for reading and writing to a instance variable with volatile (Java) semantic as |
.attr_volatile | Creates methods for reading and writing (as |
.ensure_safe_initialization_when_final_fields_are_present | For testing purposes, quite slow. |
.new | Has to be called by children. |
.safe_initialization!, .define_initialize_atomic_fields |
Synchronization::AbstractObject
- Inherited
Instance Attribute Summary
Instance Method Summary
-
#<=>(_other)
Always greater than other nodes.
Node
- Inherited
#<=> | We use |
#data, #key, | |
#key_for | This method provides a unqiue key for the data which will be used for ordering. |
#next_node | Next node in the list. |
#successor_reference |
Synchronization::Object
- Inherited
Synchronization::Volatile
- Included
Synchronization::AbstractObject
- Inherited
Constructor Details
.new(_data = nil, _succ = nil) ⇒ Tail
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_linked_set/node.rb', line 60
def initialize(_data = nil, _succ = nil) @SuccessorReference = AtomicMarkableReference.new self end
Instance Method Details
#<=>(_other)
Always greater than other nodes. This means that traversal will end at the tail node since we are comparing node size in the traversal.
# File 'lib/concurrent-ruby-edge/concurrent/edge/lock_free_linked_set/node.rb', line 66
def <=>(_other) 1 end