|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.cluster.ClusterNode
public class ClusterNode
Default clustered node implementation.
| Field Summary | |
|---|---|
static String |
SYSTEM_PROPERTY_NODE_ID
System property specifying a node id to use. |
| Constructor Summary | |
|---|---|
ClusterNode()
|
|
| Method Summary | |
|---|---|
void |
consume(Record record)
Consume a record. |
LockEventChannel |
createLockChannel(String workspace)
Create a LockEventChannel for some workspace. |
UpdateEventChannel |
createUpdateChannel(String workspace)
Create an UpdateEventChannel for some workspace. |
void |
ended(org.apache.jackrabbit.core.cluster.AbstractClusterOperation operation,
boolean successful)
Invoked when a cluster operation has ended. |
String |
getId()
Return the unique identifier of the records this consumer will be able to handle. |
long |
getRevision()
Return the revision this consumer has last seen. |
protected void |
init()
Initialize this cluster node (overridable). |
void |
init(ClusterContext clusterContext)
Initialize this cluster node. |
void |
registered(Collection ntDefs)
Called when one or more node types have been registered. |
void |
remapped(String oldPrefix,
String newPrefix,
String uri)
Called when a namespace has been remapped. |
void |
reregistered(NodeTypeDef ntDef)
Called when a node types has been re-registered. |
void |
run()
Run loop that will sync this node after some delay. |
void |
setListener(NamespaceEventListener listener)
Set listener that will receive information about incoming, external namespace events. |
void |
setListener(NodeTypeEventListener listener)
Set listener that will receive information about incoming, external node type events. |
void |
setRevision(long revision)
Set the revision this consumer has last seen. |
void |
start()
Starts this cluster node. |
void |
stop()
Stops this cluster node. |
void |
sync()
Synchronize contents from journal. |
void |
unregistered(Collection qnames)
Called when one or more node types have been unregistered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SYSTEM_PROPERTY_NODE_ID
| Constructor Detail |
|---|
public ClusterNode()
| Method Detail |
|---|
public void init(ClusterContext clusterContext)
throws ClusterException
ClusterException - if an error occurs
protected void init()
throws ClusterException
ClusterException - if an error occurs
public void start()
throws ClusterException
ClusterException - if an error occurspublic void run()
run in interface Runnable
public void sync()
throws ClusterException
ClusterException - if an error occurspublic void stop()
public UpdateEventChannel createUpdateChannel(String workspace)
UpdateEventChannel for some workspace.
workspace - workspace name
public LockEventChannel createLockChannel(String workspace)
LockEventChannel for some workspace.
workspace - workspace name
public void remapped(String oldPrefix,
String newPrefix,
String uri)
remapped in interface NamespaceEventChanneloldPrefix - old prefix. if null this is a fresh mappingnewPrefix - new prefix. if null this is an unmap operationuri - uri to map prefix topublic void setListener(NamespaceEventListener listener)
NamespaceEventChannel
setListener in interface NamespaceEventChannellistener - namespace event listenerpublic void registered(Collection ntDefs)
registered in interface NodeTypeEventChannelntDefs - collection of node type definitionspublic void reregistered(NodeTypeDef ntDef)
reregistered in interface NodeTypeEventChannelntDef - node type definitionpublic void unregistered(Collection qnames)
unregistered in interface NodeTypeEventChannelqnames - collection of node type qnamespublic void setListener(NodeTypeEventListener listener)
setListener in interface NodeTypeEventChannellistener - node type event listenerpublic String getId()
getId in interface RecordConsumerpublic long getRevision()
getRevision in interface RecordConsumerpublic void consume(Record record)
consume in interface RecordConsumerrecord - record to consumepublic void setRevision(long revision)
setRevision in interface RecordConsumerrevision - revision
public void ended(org.apache.jackrabbit.core.cluster.AbstractClusterOperation operation,
boolean successful)
successful,
attempts to fill the journal record and update it, otherwise cancels
the update.
operation - cluster operationsuccessful - true if the operation was successful and
the journal record should be updated;
false to revoke changes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||