站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

HAPartition.HAPartitionStateTransfer (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.framework.interfaces
Interface HAPartition.HAPartitionStateTransfer

All Known Implementing Classes:
DistributedReplicantManagerImpl, DistributedStateImpl, HAJNDI, HASessionStateImpl
Enclosing interface:
HAPartition

public static interface HAPartition.HAPartitionStateTransfer

State management is higly important for clustered services. Consequently, services that wish to manage their state need to subscribe to state transfer events. When their node start, a state is pushed from another node to them. When another node starts, they may be asked to provide such a state to initialise the newly started node.


Method Summary
 Serializable getCurrentState()
          Called when a new node need to be initialized.
 void setCurrentState(Serializable newState)
          This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback
 

Method Detail

getCurrentState

public Serializable getCurrentState()
Called when a new node need to be initialized. This is called on any existing node to determine a current state for this service.

Returns:
A serializable representation of the state

setCurrentState

public void setCurrentState(Serializable newState)
This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback

Parameters:
newState - The serialized representation of the state of the new service.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.