class SwitchBoard::AbstractDataset

Attributes

persistance[RW]

Public Instance Methods

get_all_locked_ids() click to toggle source

Retrive all the locked ids in the switchboard

# File lib/switch_board/datasets/abstract_dataset.rb, line 57
def get_all_locked_ids
  raise "#{__method__} not implemented in #{self.class.name}"
end
get_locked() click to toggle source

get the IDs that are now locked by other lockers

# File lib/switch_board/datasets/abstract_dataset.rb, line 17
def get_locked
  raise "#{__method__} not implemented in #{self.class.name}"
end
get_next(limit = 1) click to toggle source

Returns the next Model/ID that is available from the dataset

# File lib/switch_board/datasets/abstract_dataset.rb, line 12
def get_next(limit = 1)
  raise "#{__method__} not implemented in #{self.class.name}"
end
id_locked?(uid) click to toggle source

Check to see if a certain ID is locked or not

# File lib/switch_board/datasets/abstract_dataset.rb, line 52
def id_locked?(uid)
  raise "#{__method__} not implemented in #{self.class.name}"
end
list_lockers() click to toggle source

list all the lockers registerd for this switchboard

# File lib/switch_board/datasets/abstract_dataset.rb, line 32
def list_lockers
  raise "#{__method__} not implemented in #{self.class.name}"
end
lock_id(locker_uid, id_to_lock, expire_in_sec = 60) click to toggle source

Set ID of an object as locked for a specific uid

# File lib/switch_board/datasets/abstract_dataset.rb, line 42
def lock_id(locker_uid, id_to_lock, expire_in_sec = 60)
  raise "#{__method__} not implemented in #{self.class.name}"
end
locker(uid) click to toggle source

list retrive data of a specific locker

# File lib/switch_board/datasets/abstract_dataset.rb, line 37
def locker(uid)
  raise "#{__method__} not implemented in #{self.class.name}"
end
register_locker(uid, name) click to toggle source

Add a new locker to the switchboard for future coordination

# File lib/switch_board/datasets/abstract_dataset.rb, line 27
def register_locker(uid, name)
  raise "#{__method__} not implemented in #{self.class.name}"
end
set_persistance(persistance) click to toggle source
# File lib/switch_board/datasets/abstract_dataset.rb, line 7
def set_persistance(persistance)
  @persistance = persistance
end
switchboard() click to toggle source

setup a new switchboard, a coordination persistence schema

# File lib/switch_board/datasets/abstract_dataset.rb, line 22
def switchboard
  raise "#{__method__} not implemented in #{self.class.name}"
end
unlock_id(locker_uid, id_to_unlock) click to toggle source

Set ID of an object as locked for a specific uid

# File lib/switch_board/datasets/abstract_dataset.rb, line 47
def unlock_id(locker_uid, id_to_unlock)
  raise "#{__method__} not implemented in #{self.class.name}"
end