com.solab.alarms
Interface AlarmCache

All Known Implementing Classes:
DefaultAlarmCache

public interface AlarmCache

The AlarmSender uses a cache to avoid resending the same message very frequently. This interface allows for different implementations of the caching mechanism.

Author:
Enrique Zamudio

Method Summary
 boolean shouldResend(AlarmChannel channel, String source, String message)
          This method returns true if the specified message with optional source has not been sent through the specified channel very recently (meaning the resend interval for the channel has elapsed).
 void shutdown()
          Subclasses must override this, closing and freeing up any resources they use (connections, etc).
 void store(AlarmChannel channel, String source, String message)
          Stores the current date for the specified message and optional source, for the given channel.
 

Method Detail

store

void store(AlarmChannel channel,
           String source,
           String message)
Stores the current date for the specified message and optional source, for the given channel.


shouldResend

boolean shouldResend(AlarmChannel channel,
                     String source,
                     String message)
This method returns true if the specified message with optional source has not been sent through the specified channel very recently (meaning the resend interval for the channel has elapsed).


shutdown

void shutdown()
Subclasses must override this, closing and freeing up any resources they use (connections, etc).



Copyright © 2011 Java Mexico. All Rights Reserved.