ClearNotification.java :  » Cache » shiftone-cache » org » shiftone » cache » decorator » cluster » Java Open Source

Java Open Source » Cache » shiftone cache 
shiftone cache » org » shiftone » cache » decorator » cluster » ClearNotification.java
package org.shiftone.cache.decorator.cluster;



import org.shiftone.cache.Cache;


/**
 * @version $Revision: 1.4 $
 * @author <a href="mailto:jeff@shiftone.org">Jeff Drost</a>
 */
public class ClearNotification implements Notification
{

    private final long   senderInstanceId;
    private final String cacheName;

    public ClearNotification(long senderInstanceId, String cacheName)
    {
        this.senderInstanceId = senderInstanceId;
        this.cacheName        = cacheName;
    }


    public void execute(Cache cache)
    {
        cache.clear();
    }


    public String getCacheName()
    {
        return cacheName;
    }


    public long getSenderInstanceId()
    {
        return senderInstanceId;
    }


    public String toString()
    {
        return "clear()";
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.