com.jivesoftware.forum.watches
Class BatchWatchEmailerImpl
java.lang.Object
com.jivesoftware.forum.watches.BatchWatchEmailerImpl
- All Implemented Interfaces:
- BatchWatchEmailer, com.tangosol.io.ExternalizableLite, com.tangosol.net.Invocable, java.io.Serializable, java.lang.Runnable
public class BatchWatchEmailerImpl
- extends java.lang.Object
- implements BatchWatchEmailer, com.tangosol.net.Invocable, com.tangosol.io.ExternalizableLite
A task that sends out a batch email watch for a specific user. This task is designed
to be able to run in a cluster to improve performance for systems that must send out
a very large number of emails. The best way to run this task if clustering is enabled
is to use the CacheFactory.doRandomMemberClusterTask(com.tangosol.net.Invocable, com.tangosol.net.InvocationObserver, boolean)
method to execute this task on a random member of the cluster.
- See Also:
- Serialized Form
Method Summary |
void |
email(long userID,
java.util.Date previousEmailDate,
java.util.Date now)
Executes the task by loading a list of watches and compiling and sending the batch email. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getResult()
|
int |
hashCode()
|
void |
init(com.tangosol.net.InvocationService invocationService)
|
void |
readExternal(java.io.DataInput dataInput)
|
void |
run()
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.DataOutput dataOutput)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DIGEST_SUBJECT
public static final java.lang.String DIGEST_SUBJECT
- See Also:
- Constant Field Values
DIGEST_BODY
public static final java.lang.String DIGEST_BODY
- See Also:
- Constant Field Values
BatchWatchEmailerImpl
public BatchWatchEmailerImpl()
BatchWatchEmailerImpl
public BatchWatchEmailerImpl(long userID,
long previousEmailDate,
long now)
init
public void init(com.tangosol.net.InvocationService invocationService)
- Specified by:
init
in interface com.tangosol.net.Invocable
run
public void run()
- Specified by:
run
in interface com.tangosol.net.Invocable
- Specified by:
run
in interface java.lang.Runnable
getResult
public java.lang.Object getResult()
- Specified by:
getResult
in interface com.tangosol.net.Invocable
email
public void email(long userID,
java.util.Date previousEmailDate,
java.util.Date now)
- Executes the task by loading a list of watches and compiling and sending the batch email.
- Specified by:
email
in interface BatchWatchEmailer
readExternal
public void readExternal(java.io.DataInput dataInput)
throws java.io.IOException
- Specified by:
readExternal
in interface com.tangosol.io.ExternalizableLite
- Throws:
java.io.IOException
writeExternal
public void writeExternal(java.io.DataOutput dataOutput)
throws java.io.IOException
- Specified by:
writeExternal
in interface com.tangosol.io.ExternalizableLite
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1999-2006 Jive Software.