Storage creation


To create a customize storage, you must begin to create a python module prefixed by "storage_".

In this, module, you create a new class named "Storage" and herited of "LINC.Bags.storage_Meta.Storage" (or a sub-herited class like "LINC.Bags.storage_TupleSpace.Storage").

For customize intialization of your bag, you can override 2 functions:

  • def init(self, args) The bag constructor with args for bag context

  • def init(self) This optional function is called by bag after initialized.

2-Read resources

  • def init_handler(self, mask)

  • def delete_handler(self, handler)

  • def get_next_resource(self, handler)

3-Check, remove and add resource

  • def reserve_resource(self, key)

  • def test_resource(self, key)

  • def test_resource_status(self, key)

  • def remove_resource(self, key)

  • def release_resource(self, key)

  • def add_resource(self, resource)

4-Advanced function

  • def can_be_destroyed(self)