|
||||||||||
| 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(DefaultClusterOperation 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. |
Journal |
getJournal()
Return the journal created by this cluster node. |
long |
getRevision()
Return the revision this consumer has last seen. |
long |
getStopDelay()
Return the stop delay. |
protected void |
init()
Initialize this cluster node (overridable). |
void |
init(ClusterContext clusterContext)
Initialize this cluster node. |
void |
process(ChangeLogRecord record)
Process a change log record. |
void |
process(LockRecord record)
Process a lock record. |
void |
process(NamespaceRecord record)
Process a namespace record. |
void |
process(NodeTypeRecord record)
Process a node type record |
void |
process(WorkspaceRecord record)
Process a workspace record |
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(QNodeTypeDefinition 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 |
setListener(WorkspaceListener listener)
|
void |
setRevision(long revision)
Set the revision this consumer has last seen. |
void |
setStopDelay(long stopDelay)
Set the stop delay, i.e. |
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. |
void |
workspaceCreated(String workspaceName,
ClonedInputSource inputSource)
|
| 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 occurspublic void setStopDelay(long stopDelay)
stopDelay - stop delay in millisecondspublic long getStopDelay()
setStopDelay(long)
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 Journal getJournal()
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(QNodeTypeDefinition 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 - revisionpublic void process(ChangeLogRecord record)
process in interface ClusterRecordProcessorrecord - change log recordpublic void process(LockRecord record)
process in interface ClusterRecordProcessorrecord - lock recordpublic void process(NamespaceRecord record)
process in interface ClusterRecordProcessorrecord - namespace recordpublic void process(NodeTypeRecord record)
process in interface ClusterRecordProcessorrecord - node type recordpublic void process(WorkspaceRecord record)
ClusterRecordProcessor
process in interface ClusterRecordProcessorrecord - workspace recordpublic void setListener(WorkspaceListener listener)
setListener in interface WorkspaceEventChannel
public void workspaceCreated(String workspaceName,
ClonedInputSource inputSource)
workspaceCreated in interface WorkspaceEventChannel
public void ended(DefaultClusterOperation 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 | |||||||||