com.caucho.distcache.cluster
Class CacheMnodeActor

java.lang.Object
  extended by com.caucho.bam.stream.AbstractMessageStream
      extended by com.caucho.bam.actor.SimpleActor
          extended by com.caucho.cloud.bam.AbstractCloudActor
              extended by com.caucho.distcache.cluster.CacheMnodeActor
All Implemented Interfaces:
Actor, ActorHolder, ManagedActor, MessageStream, ClusterServerListener
Direct Known Subclasses:
CacheMnodeTriadActor

public class CacheMnodeActor
extends AbstractCloudActor
implements ClusterServerListener

Service for handling the distributed cache


Field Summary
protected static java.lang.String ACTOR_NAME
           
 
Method Summary
 HashKey compareAndPut(TriadCacheCompareAndPut msg)
           
 HashKey getAndPut(MnodeUpdate mnodeUpdate, java.lang.Object value, long leaseTimeout, int leaseOwner)
           
protected  com.caucho.distcache.cluster.CacheMnodeManager getMnodeManager()
           
protected  void notifyLeaseChange(HashKey key, TriadOwner keyOwner, int leaseOwner)
          Notify the lease owner of a change in the value.
 void notifyLeaseOwner(java.lang.String to, java.lang.String from, NotifyLeaseOwner msg)
          notify the lease owner of an update
 void serverStart(ClusterServer server)
          Called when a server starts.
 void serverStop(ClusterServer server)
          Called when a server stops.
protected  void start()
           
protected  CachePut triadCompareAndPut(TriadCacheCompareAndPut msg)
           
protected  CachePut triadGetAndPut(TriadCacheGetAndPut msg)
           
 
Methods inherited from class com.caucho.cloud.bam.AbstractCloudActor
dbgId, getBamSender, getMailboxType, getManagedBroker, getPod, registerActor
 
Methods inherited from class com.caucho.bam.actor.SimpleActor
getActor, getAddress, getBroker, getMailbox, getSender, setAddress, setBroker, setMailbox
 
Methods inherited from class com.caucho.bam.stream.AbstractMessageStream
isClosed, message, messageError, query, queryError, queryResult, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.bam.stream.MessageStream
isClosed, message, messageError, query, queryError, queryResult
 

Field Detail

ACTOR_NAME

protected static java.lang.String ACTOR_NAME
Method Detail

getMnodeManager

protected com.caucho.distcache.cluster.CacheMnodeManager getMnodeManager()

start

protected void start()

serverStart

public void serverStart(ClusterServer server)
Called when a server starts.

Specified by:
serverStart in interface ClusterServerListener

serverStop

public void serverStop(ClusterServer server)
Called when a server stops.

Specified by:
serverStop in interface ClusterServerListener

getAndPut

public HashKey getAndPut(MnodeUpdate mnodeUpdate,
                         java.lang.Object value,
                         long leaseTimeout,
                         int leaseOwner)

triadGetAndPut

protected CachePut triadGetAndPut(TriadCacheGetAndPut msg)

compareAndPut

public HashKey compareAndPut(TriadCacheCompareAndPut msg)

triadCompareAndPut

protected CachePut triadCompareAndPut(TriadCacheCompareAndPut msg)

notifyLeaseChange

protected void notifyLeaseChange(HashKey key,
                                 TriadOwner keyOwner,
                                 int leaseOwner)
Notify the lease owner of a change in the value.


notifyLeaseOwner

@Message
public void notifyLeaseOwner(java.lang.String to,
                                     java.lang.String from,
                                     NotifyLeaseOwner msg)
notify the lease owner of an update