org.hibernate.search.backend.impl.jgroups
public class MasterNodeSelector extends Object implements NodeSelectorStrategy
This NodeSelectorStrategy is a static configuration for the local
node to always process index operations locally, and accept index operations
from remote nodes configured as slaves.
JGroups does not provide a persistent queue, if that level of reliability is needed, use the JMS backend.
This implementation matches the jgroupsMaster configuration property.
| Constructor and Description |
|---|
MasterNodeSelector() |
| Modifier and Type | Method and Description |
|---|---|
Message |
createMessage(byte[] data)
Different message options can be applied using different constructors,
hence we delegate Message construction to the strategy.
|
boolean |
isIndexOwnerLocal()
Specifies if the current (local) node should apply
changes to the index.
|
void |
setLocalAddress(Address address)
The implementation might need to know it's own address, so this
is provided at channel initial connection.
|
void |
viewAccepted(View view)
Invoked by JGroups on view change.
|
public boolean isIndexOwnerLocal()
NodeSelectorStrategyisIndexOwnerLocal in interface NodeSelectorStrategypublic void setLocalAddress(Address address)
NodeSelectorStrategysetLocalAddress in interface NodeSelectorStrategyaddress - the local addresspublic void viewAccepted(View view)
NodeSelectorStrategyorg.jgroups.MembershipListener#viewAccepted(View)viewAccepted in interface NodeSelectorStrategyview - contains information on the current members of the cluster grouppublic Message createMessage(byte[] data)
NodeSelectorStrategycreateMessage in interface NodeSelectorStrategydata - the information to be sent to the master.Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved