cgl.narada.service.storage
Interface StorageService

All Known Implementing Classes:
StorageServiceDbImpl, StorageServiceFileImpl, StorageServiceMemImpl

public interface StorageService

Provides a host of storage related operations that are important for ensuring reliable delivery


Method Summary
 void advanceCatenation(int catenation, int templateId, int entityId)
          Advance the catenation associated with an entity
 void advanceSyncpoint(long syncpoint, int templateId, int entityId)
          Advance the sync point associated with an entity
 long[] checkIfSequencesBelongToTemplate(int templateId, long[] sequences)
          This method checks to see if the sequences in the arguments belong to the specified template.
 int getCatenation(int templateId, int entityId)
          Get the catenation associated with an entity
 TemplateInfo[] getListOfManagedTemplates()
          Returns a array containing the list of managed templates
 int[] getListOfRegisteredEntities()
          Returns a list of registered entities
 int[] getListOfRegisteredEntities(int templateId)
          Returns a list of registered entities to a given template
 Profile[] getListOfRegisteredProfiles(int templateId)
          Returns a list of profiles registered to a given template
 long getSequenceNumberLastAssigned()
          Returns the sequence number last assigned by the reliable delivery service
 long getSequenceNumberLastAssigned(int templateId)
          Returns the sequence number last assigned by the reliable delivery service for a given templateId
 InventoryEvent getStoredEvent(long sequenceNumber)
          Upon receipt of a NAK request we need to retrieve the inventory event that corresponds to
 long getSyncpoint(int templateId, int entityId)
          Get the syncpoint associated with an entity
 long getTimestamp(long sequnceNumber, int templateId)
           
 void processAcknowledgement(long sequenceNumber, int entityId)
          Process the acknowledgement of an event's receipt by an entity
 void removeEntityFromTemplate(int entityId, int templateId)
          Deregister's an entity from a managed template
 void removeProfile(int templateId, Profile profile)
           
 void removeRegisteredEntity(int entityId)
          Removes a registered entity.
 void removeTemplateManagement(int templateId)
           
 LinkedList retrieveMaximumSequeceNumberAndTimestamp(int temlateId)
           
 LinkedList retrieveMinimumSequeceNumberAndTimestamp(int temlateId)
           
 long[] retrieveMissedSequences(long startingAt, long endingAt, int templateId, int entityId)
          Retrieves a list of missed sequences between the specified range of sequence numbers.
 long[] retrieveSequences(long startingAt, long endingAt, int templateId, int maxOccurs)
          Between the sequence range specified, this method returns all sequences which belong to the specified template.
 LinkedList retrieveSequencesAndTimestamps(int templateId)
           
 LinkedList retrieveSequencesAndTimestamps(long startingTimestamp, long endingTimestamp, int templateId)
           
 LinkedList retrieveSequencesAndTimestampsStartingAt(long startingSequenceNumber, long endingTimestamp, int templateId)
           
 LinkedList retrieveSequencesByTimestamps(long startingTimestamp, long endingTimestamp, int templateId)
           
 long retrieveTimestamp(int templateId, long sequenceNumber)
           
 void store(CompanionDbInfo companionDbInfo, InventoryEvent inventoryEvent, SequenceDestinations sequenceDestinations)
          This method should not return unless the event has been written to stable storage
 void storeEntityForTemplate(int entityId, int templateId)
           
 void storeProfile(int templateId, Profile profile)
           
 void storeRegisteredEntity(int entityId)
          Stores a registered entity
 void storeTemplate(TemplateInfo templateInfo)
           
 

Method Detail

storeProfile

void storeProfile(int templateId,
                  Profile profile)
                  throws ServiceException
Throws:
ServiceException

removeProfile

void removeProfile(int templateId,
                   Profile profile)
                   throws ServiceException
Throws:
ServiceException

storeRegisteredEntity

void storeRegisteredEntity(int entityId)
                           throws ServiceException
Stores a registered entity

Throws:
ServiceException

removeRegisteredEntity

void removeRegisteredEntity(int entityId)
                            throws ServiceException
Removes a registered entity. This method should also remove the entity from any profiles that it was subscribed to and and templateId to which it was registered

Throws:
ServiceException

storeTemplate

void storeTemplate(TemplateInfo templateInfo)
                   throws ServiceException
Throws:
ServiceException

removeTemplateManagement

void removeTemplateManagement(int templateId)
                              throws ServiceException
Throws:
ServiceException

storeEntityForTemplate

void storeEntityForTemplate(int entityId,
                            int templateId)
                            throws ServiceException
Throws:
ServiceException

removeEntityFromTemplate

void removeEntityFromTemplate(int entityId,
                              int templateId)
                              throws ServiceException
Deregister's an entity from a managed template

Throws:
ServiceException

getListOfRegisteredEntities

int[] getListOfRegisteredEntities()
                                  throws ServiceException
Returns a list of registered entities

Throws:
ServiceException

getListOfRegisteredEntities

int[] getListOfRegisteredEntities(int templateId)
                                  throws ServiceException
Returns a list of registered entities to a given template

Throws:
ServiceException

getListOfRegisteredProfiles

Profile[] getListOfRegisteredProfiles(int templateId)
                                      throws ServiceException
Returns a list of profiles registered to a given template

Throws:
ServiceException

getListOfManagedTemplates

TemplateInfo[] getListOfManagedTemplates()
                                         throws ServiceException
Returns a array containing the list of managed templates

Throws:
ServiceException

store

void store(CompanionDbInfo companionDbInfo,
           InventoryEvent inventoryEvent,
           SequenceDestinations sequenceDestinations)
           throws ServiceException
This method should not return unless the event has been written to stable storage

Throws:
ServiceException

getStoredEvent

InventoryEvent getStoredEvent(long sequenceNumber)
                              throws ServiceException
Upon receipt of a NAK request we need to retrieve the inventory event that corresponds to

Throws:
ServiceException

processAcknowledgement

void processAcknowledgement(long sequenceNumber,
                            int entityId)
                            throws ServiceException
Process the acknowledgement of an event's receipt by an entity

Throws:
ServiceException

checkIfSequencesBelongToTemplate

long[] checkIfSequencesBelongToTemplate(int templateId,
                                        long[] sequences)
                                        throws ServiceException
This method checks to see if the sequences in the arguments belong to the specified template. The return argument of this method, is the list of sequences that did not belong to the template in question. If the return value is null it implies that all the sequences passed as an argument to this method did indeed belong to the template in question

Throws:
ServiceException

retrieveSequencesAndTimestamps

LinkedList retrieveSequencesAndTimestamps(int templateId)
                                          throws ServiceException
Throws:
ServiceException

retrieveSequencesAndTimestamps

LinkedList retrieveSequencesAndTimestamps(long startingTimestamp,
                                          long endingTimestamp,
                                          int templateId)
                                          throws ServiceException
Throws:
ServiceException

retrieveTimestamp

long retrieveTimestamp(int templateId,
                       long sequenceNumber)
                       throws ServiceException
Throws:
ServiceException

retrieveSequencesAndTimestampsStartingAt

LinkedList retrieveSequencesAndTimestampsStartingAt(long startingSequenceNumber,
                                                    long endingTimestamp,
                                                    int templateId)
                                                    throws ServiceException
Throws:
ServiceException

retrieveSequencesByTimestamps

LinkedList retrieveSequencesByTimestamps(long startingTimestamp,
                                         long endingTimestamp,
                                         int templateId)
                                         throws ServiceException
Throws:
ServiceException

getTimestamp

long getTimestamp(long sequnceNumber,
                  int templateId)
                  throws ServiceException
Throws:
ServiceException

retrieveSequences

long[] retrieveSequences(long startingAt,
                         long endingAt,
                         int templateId,
                         int maxOccurs)
                         throws ServiceException
Between the sequence range specified, this method returns all sequences which belong to the specified template. The maxOccurs variable controls the maximum number of sequences that needs to be returned by this method.

Throws:
ServiceException

retrieveMissedSequences

long[] retrieveMissedSequences(long startingAt,
                               long endingAt,
                               int templateId,
                               int entityId)
                               throws ServiceException
Retrieves a list of missed sequences between the specified range of sequence numbers. This method will return a null if there are indeed no missed sequences

Throws:
ServiceException

advanceSyncpoint

void advanceSyncpoint(long syncpoint,
                      int templateId,
                      int entityId)
                      throws ServiceException
Advance the sync point associated with an entity

Throws:
ServiceException

getSyncpoint

long getSyncpoint(int templateId,
                  int entityId)
                  throws ServiceException
Get the syncpoint associated with an entity

Throws:
ServiceException

advanceCatenation

void advanceCatenation(int catenation,
                       int templateId,
                       int entityId)
                       throws ServiceException
Advance the catenation associated with an entity

Throws:
ServiceException

getCatenation

int getCatenation(int templateId,
                  int entityId)
                  throws ServiceException
Get the catenation associated with an entity

Throws:
ServiceException

getSequenceNumberLastAssigned

long getSequenceNumberLastAssigned()
                                   throws ServiceException
Returns the sequence number last assigned by the reliable delivery service

Throws:
ServiceException

getSequenceNumberLastAssigned

long getSequenceNumberLastAssigned(int templateId)
                                   throws ServiceException
Returns the sequence number last assigned by the reliable delivery service for a given templateId

Throws:
ServiceException

retrieveMinimumSequeceNumberAndTimestamp

LinkedList retrieveMinimumSequeceNumberAndTimestamp(int temlateId)
                                                    throws ServiceException
Throws:
ServiceException

retrieveMaximumSequeceNumberAndTimestamp

LinkedList retrieveMaximumSequeceNumberAndTimestamp(int temlateId)
                                                    throws ServiceException
Throws:
ServiceException


For comments and suggestions please send e-mail to The NaradaBrokering Project
"skip-navbar_bottom">
For comments and suggestions please send e-mail to The NaradaBrokering Project