⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clustermanager.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this JVM is part of a cluster.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#isClusteringStarting()">isClusteringStarting</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true is clustering is currently being started.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#isClusterMember(byte[])">isClusterMember</A></B>(byte[]&nbsp;nodeID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the specified node ID belongs to a known cluster node of this cluster.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#isSeniorClusterMember()">isSeniorClusterMember</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this member is the senior member in the cluster.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#removeListener(org.jivesoftware.openfire.cluster.ClusterEventListener)">removeListener</A></B>(<A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterEventListener.html" title="interface in org.jivesoftware.openfire.cluster">ClusterEventListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters a listener to receive events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#setClusteringEnabled(boolean)">setClusteringEnabled</A></B>(boolean&nbsp;enabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets true if clustering support is enabled.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#shutdown()">shutdown</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shuts down the clustering service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#startup()">startup</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the cluster service if clustering is enabled.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="CLUSTER_PROPERTY_NAME"><!-- --></A><H3>CLUSTER_PROPERTY_NAME</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>CLUSTER_PROPERTY_NAME</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ClusterManager()"><!-- --></A><H3>ClusterManager</H3><PRE>public <B>ClusterManager</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="addListener(org.jivesoftware.openfire.cluster.ClusterEventListener)"><!-- --></A><H3>addListener</H3><PRE>public static void <B>addListener</B>(<A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterEventListener.html" title="interface in org.jivesoftware.openfire.cluster">ClusterEventListener</A>&nbsp;listener)</PRE><DL><DD>Registers a listener to receive events.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener.</DL></DD></DL><HR><A NAME="removeListener(org.jivesoftware.openfire.cluster.ClusterEventListener)"><!-- --></A><H3>removeListener</H3><PRE>public static void <B>removeListener</B>(<A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterEventListener.html" title="interface in org.jivesoftware.openfire.cluster">ClusterEventListener</A>&nbsp;listener)</PRE><DL><DD>Unregisters a listener to receive events.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener.</DL></DD></DL><HR><A NAME="fireJoinedCluster(boolean)"><!-- --></A><H3>fireJoinedCluster</H3><PRE>public static void <B>fireJoinedCluster</B>(boolean&nbsp;asynchronous)</PRE><DL><DD>Triggers event indicating that this JVM is now part of a cluster. At this point the <A HREF="../../../../org/jivesoftware/openfire/XMPPServer.html#getNodeID()"><CODE>XMPPServer.getNodeID()</CODE></A> holds the new nodeID value and the old nodeID value is passed in case the listener needs it.<p> <p/> When joining the cluster as the senior cluster member the <A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#fireMarkedAsSeniorClusterMember()"><CODE>fireMarkedAsSeniorClusterMember()</CODE></A> event will be sent right after this event.<p> <p/> This event will be triggered in another thread. This will avoid potential deadlocks in Coherence.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>asynchronous</CODE> - true if event will be triggered in background</DL></DD></DL><HR><A NAME="fireJoinedCluster(byte[], boolean)"><!-- --></A><H3>fireJoinedCluster</H3><PRE>public static void <B>fireJoinedCluster</B>(byte[]&nbsp;nodeID,                                     boolean&nbsp;asynchronous)</PRE><DL><DD>Triggers event indicating that another JVM is now part of a cluster.<p> This event will be triggered in another thread. This will avoid potential deadlocks in Coherence.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>nodeID</CODE> - nodeID assigned to the JVM when joining the cluster.<DD><CODE>asynchronous</CODE> - true if event will be triggered in background</DL></DD></DL><HR><A NAME="fireLeftCluster()"><!-- --></A><H3>fireLeftCluster</H3><PRE>public static void <B>fireLeftCluster</B>()</PRE><DL><DD>Triggers event indicating that this JVM is no longer part of the cluster. This could happen when disabling clustering support or removing the enterprise plugin that provides clustering support.<p> Moreover, if we were in a "split brain" scenario (ie. separated cluster islands) and the island were this JVM belonged was marked as "old" then all nodes of that island will get the <tt>left cluster event</tt> and <tt>joined cluster events</tt>. That means that caches will be reset and thus will need to be repopulated again with fresh data from this JVM. This also includes the case where this JVM was the senior cluster member and when the islands met again then this JVM stopped being the senior member.<P><DD><DL></DL></DD></DL><HR><A NAME="fireLeftCluster(byte[])"><!-- --></A><H3>fireLeftCluster</H3><PRE>public static void <B>fireLeftCluster</B>(byte[]&nbsp;nodeID)</PRE><DL><DD>Triggers event indicating that another JVM is no longer part of the cluster. This could happen when disabling clustering support or removing the enterprise plugin that provides clustering support.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>nodeID</CODE> - nodeID assigned to the JVM when joining the cluster.</DL></DD></DL><HR><A NAME="fireMarkedAsSeniorClusterMember()"><!-- --></A><H3>fireMarkedAsSeniorClusterMember</H3><PRE>public static void <B>fireMarkedAsSeniorClusterMember</B>()</PRE><DL><DD>Triggers event indicating that this JVM is now the senior cluster member. This could either happen when initially joining the cluster or when the senior cluster member node left the cluster and this JVM was marked as the new senior cluster member.<p> <p/> Moreover, in the case of a "split brain" scenario (ie. separated cluster islands) each island will have its own senior cluster member. However, when the islands meet again there could only be one senior cluster member so one of the senior cluster members will stop playing that role. When that happens the JVM no longer playing that role will receive the <A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#fireLeftCluster()"><CODE>fireLeftCluster()</CODE></A> and <A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterManager.html#fireJoinedCluster(boolean)"><CODE>fireJoinedCluster(boolean)</CODE></A> events.<p> <p/> This event will be triggered in another thread. This will avoid potential deadlocks in Coherence.<P><DD><DL></DL></DD></DL><HR><A NAME="startup()"><!-- --></A><H3>startup</H3><PRE>public static void <B>startup</B>()</PRE><DL><DD>Starts the cluster service if clustering is enabled. The process of starting clustering will recreate caches as distributed caches.<p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -