📄 cachefactorystrategy.html
字号:
<DD><DL></DL></DD></DL><HR><A NAME="createCache(java.lang.String)"><!-- --></A><H3>createCache</H3><PRE><A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A> <B>createCache</B>(<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> name)</PRE><DL><DD>Creates a new cache for the cache name specified. The created cache is already configured. Different implementations could store the cache configuration in different ways. It is recommended to store the cache configuration in an external file so it is easier for customers to change the default configuration.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the cache to create.<DT><B>Returns:</B><DD>newly created and configured cache.</DL></DD></DL><HR><A NAME="destroyCache(org.jivesoftware.util.cache.Cache)"><!-- --></A><H3>destroyCache</H3><PRE>void <B>destroyCache</B>(<A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A> cache)</PRE><DL><DD>Destroys the supplied cache.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>cache</CODE> - the cache to destroy.</DL></DD></DL><HR><A NAME="isSeniorClusterMember()"><!-- --></A><H3>isSeniorClusterMember</H3><PRE>boolean <B>isSeniorClusterMember</B>()</PRE><DL><DD>Returns true if this node is the maste node of the cluster. When not running in cluster mode a value of true should be returned.<P><DD><DL><DT><B>Returns:</B><DD>true if this node is the maste node of the cluster.</DL></DD></DL><HR><A NAME="getClusterNodesInfo()"><!-- --></A><H3>getClusterNodesInfo</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="../../../../org/jivesoftware/openfire/cluster/ClusterNodeInfo.html" title="interface in org.jivesoftware.openfire.cluster">ClusterNodeInfo</A>> <B>getClusterNodesInfo</B>()</PRE><DL><DD>Returns basic information about the current members of the cluster or an empty collection if not running in a cluster.<P><DD><DL><DT><B>Returns:</B><DD>information about the current members of the cluster or an empty collection if not running in a cluster.</DL></DD></DL><HR><A NAME="getMaxClusterNodes()"><!-- --></A><H3>getMaxClusterNodes</H3><PRE>int <B>getMaxClusterNodes</B>()</PRE><DL><DD>Returns the maximum number of cluster members allowed. A value of 0 will be returned when clustering is not allowed.<P><DD><DL><DT><B>Returns:</B><DD>the maximum number of cluster members allowed or 0 if clustering is not allowed.</DL></DD></DL><HR><A NAME="getSeniorClusterMemberID()"><!-- --></A><H3>getSeniorClusterMemberID</H3><PRE>byte[] <B>getSeniorClusterMemberID</B>()</PRE><DL><DD>Returns a byte[] that uniquely identifies this senior cluster member or <tt>null</tt> when not in a cluster.<P><DD><DL><DT><B>Returns:</B><DD>a byte[] that uniquely identifies this senior cluster member or null when not in a cluster.</DL></DD></DL><HR><A NAME="getClusterMemberID()"><!-- --></A><H3>getClusterMemberID</H3><PRE>byte[] <B>getClusterMemberID</B>()</PRE><DL><DD>Returns a byte[] that uniquely identifies this member within the cluster or <tt>null</tt> when not in a cluster.<P><DD><DL><DT><B>Returns:</B><DD>a byte[] that uniquely identifies this member within the cluster or null when not in a cluster.</DL></DD></DL><HR><A NAME="doClusterTask(org.jivesoftware.util.cache.ClusterTask)"><!-- --></A><H3>doClusterTask</H3><PRE>void <B>doClusterTask</B>(<A HREF="../../../../org/jivesoftware/util/cache/ClusterTask.html" title="interface in org.jivesoftware.util.cache">ClusterTask</A> task)</PRE><DL><DD>Invokes a task on other cluster members in an asynchronous fashion. The task will not be executed on the local cluster member. If clustering is not enabled, this method will do nothing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - the task to be invoked on all other cluster members.</DL></DD></DL><HR><A NAME="doClusterTask(org.jivesoftware.util.cache.ClusterTask, byte[])"><!-- --></A><H3>doClusterTask</H3><PRE>boolean <B>doClusterTask</B>(<A HREF="../../../../org/jivesoftware/util/cache/ClusterTask.html" title="interface in org.jivesoftware.util.cache">ClusterTask</A> task, byte[] nodeID)</PRE><DL><DD>Invokes a task on other the specified cluster member in an asynchronous fashion. If clustering is not enabled, this method will do nothing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - the task to be invoked on the specified cluster member.<DD><CODE>nodeID</CODE> - the byte array that identifies the target cluster member.<DT><B>Returns:</B><DD>false if not in a cluster or specified cluster node was not found.</DL></DD></DL><HR><A NAME="doSynchronousClusterTask(org.jivesoftware.util.cache.ClusterTask, boolean)"><!-- --></A><H3>doSynchronousClusterTask</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<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>doSynchronousClusterTask</B>(<A HREF="../../../../org/jivesoftware/util/cache/ClusterTask.html" title="interface in org.jivesoftware.util.cache">ClusterTask</A> task, boolean includeLocalMember)</PRE><DL><DD>Invokes a task on other cluster members synchronously and returns the result as a Collection (method will not return until the task has been executed on each cluster member). The task will not be executed on the local cluster member. If clustering is not enabled, this method will return an empty collection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - the ClusterTask object to be invoked on all other cluster members.<DD><CODE>includeLocalMember</CODE> - true to run the task on the local member, false otherwise<DT><B>Returns:</B><DD>collection with the result of the execution.</DL></DD></DL><HR><A NAME="doSynchronousClusterTask(org.jivesoftware.util.cache.ClusterTask, byte[])"><!-- --></A><H3>doSynchronousClusterTask</H3><PRE><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>doSynchronousClusterTask</B>(<A HREF="../../../../org/jivesoftware/util/cache/ClusterTask.html" title="interface in org.jivesoftware.util.cache">ClusterTask</A> task, byte[] nodeID)</PRE><DL><DD>Invokes a task on a given cluster member synchronously and returns the result of the remote operation. If clustering is not enabled, this method will return null.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - the ClusterTask object to be invoked on a given cluster member.<DD><CODE>nodeID</CODE> - the byte array that identifies the target cluster member.<DT><B>Returns:</B><DD>result of remote operation or null if operation failed or operation returned null.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if requested node was not found.</DL></DD></DL><HR><A NAME="updateCacheStats(java.util.Map)"><!-- --></A><H3>updateCacheStats</H3><PRE>void <B>updateCacheStats</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<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>,<A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A>> caches)</PRE><DL><DD>Updates the statistics of the specified caches and publishes them into a cache for statistics. The statistics cache is already known to the application but this could change in the future (?). When not in cluster mode then do nothing.<p> The statistics cache must contain a long array of 5 positions for each cache with the following content: <ol> <li>cache.getCacheSize()</li> <li>cache.getMaxCacheSize()</li> <li>cache.size()</li> <li>cache.getCacheHits()</li> <li>cache.getCacheMisses()</li> </ol><P><DD><DL><DT><B>Parameters:</B><DD><CODE>caches</CODE> - caches to get their stats and publish them in a statistics cache.</DL></DD></DL><HR><A NAME="getLock(java.lang.Object, org.jivesoftware.util.cache.Cache)"><!-- --></A><H3>getLock</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/locks/Lock.html" title="class or interface in java.util.concurrent.locks">Lock</A> <B>getLock</B>(<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> key, <A HREF="../../../../org/jivesoftware/util/cache/Cache.html" title="interface in org.jivesoftware.util.cache">Cache</A> cache)</PRE><DL><DD>Returns an existing lock on the specified key or creates a new one if none was found. This operation is thread safe. The supplied cache may or may not be used depending whether the server is running on cluster mode or not. When not running as part of a cluster then the lock will be unrelated to the cache and will only be visible in this JVM.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the object that defines the visibility or scope of the lock.<DD><CODE>cache</CODE> - the cache used for holding the lock.<DT><B>Returns:</B><DD>an existing lock on the specified key or creates a new one if none was found.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/jivesoftware/util/cache/CacheFactory.html" title="class in org.jivesoftware.util.cache"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/util/cache/CacheSizes.html" title="class in org.jivesoftware.util.cache"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/util/cache/CacheFactoryStrategy.html" target="_top"><B>FRAMES</B></A> <A HREF="CacheFactoryStrategy.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 2003-2008 Jive Software.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -