com.sun.sgs.service
Interface NodeMappingListener

All Known Implementing Classes:
TaskServiceImpl

public interface NodeMappingListener

A listener that can be registered with the NodeMappingService to be notified of identities being added to or removed from the local node.

Invocations of the NodeMappingListener methods are made outside of a transaction, but modifications to the map will have been performed inside a transaction.

The implementations for the methods of this interface should be idempotent because they may be invoked multiple times if the implementation throws an exception which implements ExceptionRetryStatus and shouldRetry returns true.

See Also:
NodeMappingService.addNodeMappingListener(NodeMappingListener)

Method Summary
 void mappingAdded(Identity id, Node oldNode)
          Notifies this listener that an identity has been added to this node.
 void mappingRemoved(Identity id, Node newNode)
          Notifies this listener that an identity has been removed from this node.
 

Method Detail

mappingAdded

void mappingAdded(Identity id,
                  Node oldNode)
Notifies this listener that an identity has been added to this node.

Parameters:
id - the added identity
oldNode - the last node the identity was assigned to, or null if this is the identity's first assignment

mappingRemoved

void mappingRemoved(Identity id,
                    Node newNode)
Notifies this listener that an identity has been removed from this node.

Parameters:
id - the removed identity
newNode - the new node assignment for the identity, or null if the identity has been removed from the system

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved