How it works

Different processes within application components make use of the persistent storage space provided by JavaSpaces to store, communicate, and coordinate actions. Direct interaction between objects is not established.

The following are the methods available for the processes to communicate with JavaSpaces:

  • write(): This is to write new objects to the space.
  • take(): This is to retrieve and remove objects from the space.
  • read(): This is to read objects from the space that matches the template.
  • notify(): An object gets notified if any new entry is introduced in the space that has the same rules as that of the template.
  • readIfExists() and takeIfExists(): These are inherited methods for read() and take(). At any given instance, if the object state needs to be identified, these methods can be invoked. They help in case a transaction is used to understand the state of objects at different points of time.

All the entries carried out by JavaSpaces must belong to the set of objects referred to within a component implementing the net.jini.core.entry.Entry interface. At any point in time, the lookup for an entry can be carried out. The entry lookup operation is carried out to have exact matching with the predefined set of instructions and values through a template. If there exist any additional fields other than the matched (not part of lookup) fields, such kinds of fields can be considered wildcard search entries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset