|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
cgl.narada.service.reliable.impl.ReliableDeliveryServiceImpl
public class ReliableDeliveryServiceImpl
This class provides a set of core functions that service implementations need to satisfy. All services within the system need to conform to this interface. This class pertains to the reliable delivery service being provided to entities within the system. The service is responsible for among other things (a) Maintain the list of registered entities (b) Load the appropriate matching engines, depending upon the type of templates being managed. (c) Store events received onto stable storage. (d) Manage invoice events and ensure efficient negotiations with publishing entities.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ReliableDeliveryServiceImpl(int rdsEntityId,
StorageService storageService,
Properties props,
String commType)
|
|
| Method Summary | |
|---|---|
void |
addProfile(int templateId,
Profile profile)
|
void |
addTemplateManagement(TemplateInfo templateInfo)
|
TemplateInfo |
createTemplateInfo(int templateId,
int templateType,
Object template)
|
void |
deRegisterEntity(int entityId)
Removes an entity from the list of registered entities. |
void |
deregisterEntityFromTemplate(int entityId,
int templateId)
Deregister's an entity from a managed template |
void |
deregisterSubscriptionsForTemplate(int templateId)
|
boolean |
entityExists(int entityId)
|
void |
eventReadyForStorage()
|
CompanionDbInfo |
getCompanionDbInfo(int templateId)
|
int |
getEntityId()
|
TemplateInfo[] |
getListOfManagedTemplates()
Returns a array containing the list of managed templates |
static void |
main(String[] args)
|
void |
onEvent(NBEvent nbEvent)
Upon the receipt of an event which has satisfied all the constraints, if any were provided, that needed to be satisfied prior to delivery |
void |
processAckInvoiceEvent(RdAckInvoiceEntityEvent ackInvoiceEvent)
Processes an ACK invoice event received from an entity |
void |
processCompanionEvent(RdCompanionEntityEvent companionEvent)
Processes a companion event received for a previously published event |
void |
processDiscoveryRequest()
|
void |
processEntityRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)
|
void |
processNakInvoiceEvent(RdNakInvoiceEntityEvent nakInvoiceEvent)
Processes an nak invoice event received from an entity |
void |
processProfileUpdateRequest(RdProfileUpdateRequest profileUpdateRequest)
|
void |
processPublishedEvent(NBEvent nbEvent)
Processes a published event received from an entity |
void |
processRepublishedEvent(RdRepublishedEntityEvent republishedEvent)
|
void |
recoverFromFailure()
This method is invoked the first time a stable storage starts up, which might be after a failure or after a prolonged shutdown. |
void |
registerEntity(int entityId)
|
void |
registerEntityForTemplate(int entityId,
int templateId)
Registers an entity with a managed template. |
void |
registerSubscriptionsForTemplate(int templateId)
end onEvent() |
void |
removeProfile(int templateId,
Profile profile)
|
void |
removeTemplateManagement(int templateId)
|
void |
run()
|
void |
storeEventToStorage(CompanionDbInfo companionDbInfo,
NBEvent nbEvent)
|
boolean |
templateExists(int templateId)
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReliableDeliveryServiceImpl(int rdsEntityId,
StorageService storageService,
Properties props,
String commType)
throws ServiceException
ServiceException| Method Detail |
|---|
public TemplateInfo createTemplateInfo(int templateId,
int templateType,
Object template)
throws ServiceException
ServiceExceptionpublic int getEntityId()
public void registerEntity(int entityId)
throws ServiceException
ServiceException
public void deRegisterEntity(int entityId)
throws ServiceException
ServiceException
public void registerEntityForTemplate(int entityId,
int templateId)
throws ServiceException
ServiceException
public void deregisterEntityFromTemplate(int entityId,
int templateId)
throws ServiceException
ServiceException
public void addTemplateManagement(TemplateInfo templateInfo)
throws ServiceException
ServiceException
public void removeTemplateManagement(int templateId)
throws ServiceException
ServiceExceptionpublic TemplateInfo[] getListOfManagedTemplates()
public void processProfileUpdateRequest(RdProfileUpdateRequest profileUpdateRequest)
throws ServiceException
ServiceException
public void addProfile(int templateId,
Profile profile)
throws ServiceException
ServiceException
public void removeProfile(int templateId,
Profile profile)
throws ServiceException
ServiceException
public void processAckInvoiceEvent(RdAckInvoiceEntityEvent ackInvoiceEvent)
throws ServiceException
ServiceException
public void processNakInvoiceEvent(RdNakInvoiceEntityEvent nakInvoiceEvent)
throws ServiceException
ServiceExceptionpublic void processPublishedEvent(NBEvent nbEvent)
public void processCompanionEvent(RdCompanionEntityEvent companionEvent)
public void processRepublishedEvent(RdRepublishedEntityEvent republishedEvent)
public void processEntityRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)
throws ServiceException
ServiceExceptionpublic void processDiscoveryRequest()
public void onEvent(NBEvent nbEvent)
NBEventListener
onEvent in interface NBEventListener
public void registerSubscriptionsForTemplate(int templateId)
throws ServiceException
ServiceException
public void deregisterSubscriptionsForTemplate(int templateId)
throws ServiceException
ServiceExceptionpublic void eventReadyForStorage()
public CompanionDbInfo getCompanionDbInfo(int templateId)
public void run()
run in interface Runnablerun in class Thread
public void storeEventToStorage(CompanionDbInfo companionDbInfo,
NBEvent nbEvent)
throws ServiceException
ServiceException
public void recoverFromFailure()
throws ServiceException
ServiceExceptionpublic boolean templateExists(int templateId)
public boolean entityExists(int entityId)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||