com.pmease.quickbuild.entitymanager.impl
Class DefaultAlertManager

java.lang.Object
  extended by com.pmease.quickbuild.entitymanager.impl.AbstractEntityManager<Alert>
      extended by com.pmease.quickbuild.entitymanager.impl.DefaultAlertManager
All Implemented Interfaces:
AlertManager, EntityManager<Alert>

public class DefaultAlertManager
extends AbstractEntityManager<Alert>
implements AlertManager


Field Summary
 
Fields inherited from interface com.pmease.quickbuild.entitymanager.AlertManager
instance
 
Method Summary
 void alert(Alert alert)
          Save the alert and notify those subscriber
 java.util.List<Alert> getLastN(int n)
           
 java.util.List<Alert> getLastNFromCache(int n)
          Returns last N (at most 4096) records from cache
 void maintain()
           
 void publish(NodeAlertEvent event)
          Publish a node alert event to all notifiers.
 void save(java.util.List<Alert> alerts)
          Batch save alerts
 void start()
           
 void stop()
           
 
Methods inherited from class com.pmease.quickbuild.entitymanager.impl.AbstractEntityManager
count, count, countEntities, delete, get, getAll, getAll, getSession, load, save, search, searchEntities, searchEntityIds, searchIds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.pmease.quickbuild.entitymanager.EntityManager
count, count, delete, get, getAll, getAll, load, save, search, searchIds
 

Method Detail

start

public void start()
Specified by:
start in interface AlertManager

getLastN

public java.util.List<Alert> getLastN(int n)

stop

public void stop()
Specified by:
stop in interface AlertManager

publish

public void publish(NodeAlertEvent event)
Description copied from interface: AlertManager
Publish a node alert event to all notifiers. Additionally, it will store the alerts to the cache

Specified by:
publish in interface AlertManager

alert

public void alert(Alert alert)
Description copied from interface: AlertManager
Save the alert and notify those subscriber

Specified by:
alert in interface AlertManager

getLastNFromCache

public java.util.List<Alert> getLastNFromCache(int n)
Description copied from interface: AlertManager
Returns last N (at most 4096) records from cache

Specified by:
getLastNFromCache in interface AlertManager
Returns:

maintain

public void maintain()
Specified by:
maintain in interface AlertManager

save

public void save(java.util.List<Alert> alerts)
Description copied from interface: AlertManager
Batch save alerts

Specified by:
save in interface AlertManager


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.