Java Doc for CacheFactory.java in  » Net » openfire » org » jivesoftware » util » cache » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » openfire » org.jivesoftware.util.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jivesoftware.util.cache.CacheFactory

CacheFactory
public class CacheFactory (Code)
Creates Cache objects. The returned caches will either be local or clustered depending on the clustering enabled setting and a user's license.

When clustered caching is turned on, cache usage statistics for all caches that have been created are periodically published to the clustered cache named "opt-$cacheStats".



Field Summary
public static  StringCLUSTERED_CACHE_PROPERTY_NAME
    
final public static  longDEFAULT_MAX_CACHE_LIFETIME
    
final public static  intDEFAULT_MAX_CACHE_SIZE
    
public static  StringLOCAL_CACHE_PROPERTY_NAME
    


Method Summary
public static synchronized  voidclearCaches()
    
public static synchronized  TcreateCache(String name)
     Returns the named cache, creating it as necessary.
Parameters:
  name - the name of the cache to create.
public static  voiddestroyCache(String name)
     Destroys the cache for the cache name specified.
public static  voiddoClusterTask(ClusterTask task)
     Invokes a task on other cluster members in an asynchronous fashion.
public static  voiddoClusterTask(ClusterTask task, byte[] nodeID)
     Invokes a task on a given cluster member in an asynchronous fashion.
public static  Collection<Object>doSynchronousClusterTask(ClusterTask task, boolean includeLocalMember)
     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.
public static  ObjectdoSynchronousClusterTask(ClusterTask task, byte[] nodeID)
     Invokes a task on a given cluster member synchronously and returns the result of the remote operation.
public static  Cache[]getAllCaches()
     Returns an array of all caches in the system.
public static  StringgetCacheTypeProperty(String cacheName)
    
public static  byte[]getClusterMemberID()
     Returns a byte[] that uniquely identifies this member within the cluster or null when not in a cluster.
public static  Collection<ClusterNodeInfo>getClusterNodesInfo()
     Returns basic information about the current members of the cluster or an empty collection if not running in a cluster.
public static  longgetMaxCacheLifetime(String cacheName)
     If a local property is found for the supplied name which specifies a value for cache entry lifetime, it is returned.
public static  longgetMaxCacheSize(String cacheName)
     If a local property is found for the supplied name which specifies a value for cache size, it is returned. Otherwise, the defaultSize argument is returned.
Parameters:
  cacheName - the name of the cache to look up a corresponding property for.
public static  intgetMaxClusterNodes()
     Returns the maximum number of cluster members allowed.
public static  longgetMinCacheSize(String cacheName)
    
public static  byte[]getSeniorClusterMemberID()
     Returns a byte[] that uniquely identifies this senior cluster member or null when not in a cluster.
public static  booleanhasMaxLifetimeFromProperty(String cacheName)
    
public static  booleanhasMaxSizeFromProperty(String cacheName)
    
public static synchronized  voidinitialize()
    
public static  booleanisClusteringAvailable()
     Returns true if clustering is installed and can be used by this JVM to join a cluster.
public static  booleanisClusteringStarted()
     Returns true if this node is currently a member of a cluster.
public static  booleanisClusteringStarting()
     Returns true is clustering is currently being started.
public static  booleanisSeniorClusterMember()
     Returns true if this member is the senior member in the cluster.
public static  voidjoinedCluster()
     Notification message indicating that this JVM has joined a cluster.
public static  voidleftCluster()
     Notification message indicating that this JVM has left the cluster.
public static  voidlockKey(Object key, long timeout)
    
public static  voidsetCacheTypeProperty(String cacheName, String type)
    
public static  voidsetMaxLifetimeProperty(String cacheName, long lifetime)
     Sets a local property which overrides the maximum cache entry lifetime as configured in coherence-cache-config.xml for the supplied cache name.
public static  voidsetMaxSizeProperty(String cacheName, long size)
     Sets a local property which overrides the maximum cache size as configured in coherence-cache-config.xml for the supplied cache name.
public static  voidsetMinCacheSize(String cacheName, long size)
    
public static  voidstartClustering()
    
public static  voidstopClustering()
    
public static  voidunlockKey(Object key)
    

Field Detail
CLUSTERED_CACHE_PROPERTY_NAME
public static String CLUSTERED_CACHE_PROPERTY_NAME(Code)



DEFAULT_MAX_CACHE_LIFETIME
final public static long DEFAULT_MAX_CACHE_LIFETIME(Code)



DEFAULT_MAX_CACHE_SIZE
final public static int DEFAULT_MAX_CACHE_SIZE(Code)



LOCAL_CACHE_PROPERTY_NAME
public static String LOCAL_CACHE_PROPERTY_NAME(Code)





Method Detail
clearCaches
public static synchronized void clearCaches()(Code)



createCache
public static synchronized T createCache(String name)(Code)
Returns the named cache, creating it as necessary.
Parameters:
  name - the name of the cache to create. the named cache, creating it as necessary.



destroyCache
public static void destroyCache(String name)(Code)
Destroys the cache for the cache name specified.
Parameters:
  name - the name of the cache to destroy.



doClusterTask
public static void doClusterTask(ClusterTask task)(Code)
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.
Parameters:
  task - the task to be invoked on all other cluster members.



doClusterTask
public static void doClusterTask(ClusterTask task, byte[] nodeID)(Code)
Invokes a task on a given cluster member in an asynchronous fashion. If clustering is not enabled, this method will do nothing.
Parameters:
  task - the task to be invoked on the specified cluster member.
Parameters:
  nodeID - the byte array that identifies the target cluster member.
throws:
  IllegalStateException - if requested node was not found or not running in a cluster.



doSynchronousClusterTask
public static Collection<Object> doSynchronousClusterTask(ClusterTask task, boolean includeLocalMember)(Code)
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.
Parameters:
  task - the ClusterTask object to be invoked on all other cluster members.
Parameters:
  includeLocalMember - true to run the task on the local member, false otherwise collection with the result of the execution.



doSynchronousClusterTask
public static Object doSynchronousClusterTask(ClusterTask task, byte[] nodeID)(Code)
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.
Parameters:
  task - the ClusterTask object to be invoked on a given cluster member.
Parameters:
  nodeID - the byte array that identifies the target cluster member. result of remote operation or null if operation failed or operation returned null.
throws:
  IllegalStateException - if requested node was not found or not running in a cluster.



getAllCaches
public static Cache[] getAllCaches()(Code)
Returns an array of all caches in the system. an array of all caches in the system.



getCacheTypeProperty
public static String getCacheTypeProperty(String cacheName)(Code)



getClusterMemberID
public static byte[] getClusterMemberID()(Code)
Returns a byte[] that uniquely identifies this member within the cluster or null when not in a cluster. a byte[] that uniquely identifies this member within the cluster or null when not in a cluster.



getClusterNodesInfo
public static Collection<ClusterNodeInfo> getClusterNodesInfo()(Code)
Returns basic information about the current members of the cluster or an empty collection if not running in a cluster. information about the current members of the cluster or an emptycollection if not running in a cluster.



getMaxCacheLifetime
public static long getMaxCacheLifetime(String cacheName)(Code)
If a local property is found for the supplied name which specifies a value for cache entry lifetime, it is returned. Otherwise, the defaultLifetime argument is returned.
Parameters:
  cacheName - the name of the cache to look up a corresponding property for. either the property value or the default value.



getMaxCacheSize
public static long getMaxCacheSize(String cacheName)(Code)
If a local property is found for the supplied name which specifies a value for cache size, it is returned. Otherwise, the defaultSize argument is returned.
Parameters:
  cacheName - the name of the cache to look up a corresponding property for. either the property value or the default value.



getMaxClusterNodes
public static int getMaxClusterNodes()(Code)
Returns the maximum number of cluster members allowed. A value of 0 or 1 will be returned when clustering is not allowed. the maximum number of cluster members allowed or 0 or 1 if clustering is not allowed.



getMinCacheSize
public static long getMinCacheSize(String cacheName)(Code)



getSeniorClusterMemberID
public static byte[] getSeniorClusterMemberID()(Code)
Returns a byte[] that uniquely identifies this senior cluster member or null when not in a cluster. a byte[] that uniquely identifies this senior cluster member or null when not in a cluster.



hasMaxLifetimeFromProperty
public static boolean hasMaxLifetimeFromProperty(String cacheName)(Code)



hasMaxSizeFromProperty
public static boolean hasMaxSizeFromProperty(String cacheName)(Code)



initialize
public static synchronized void initialize() throws InitializationException(Code)



isClusteringAvailable
public static boolean isClusteringAvailable()(Code)
Returns true if clustering is installed and can be used by this JVM to join a cluster. A false value could mean that either clustering support is not available or the license does not allow to have more than 1 cluster node. true if clustering is installed and can be used bythis JVM to join a cluster.



isClusteringStarted
public static boolean isClusteringStarted()(Code)
Returns true if this node is currently a member of a cluster. The last step of application initialization is to join a cluster, so this method returns false during most of application startup. true if this node is currently a member of a cluster.



isClusteringStarting
public static boolean isClusteringStarting()(Code)
Returns true is clustering is currently being started. Once the cluster is started or failed to be started this value will be false. true is clustering is currently being started.



isSeniorClusterMember
public static boolean isSeniorClusterMember()(Code)
Returns true if this member is the senior member in the cluster. If clustering is not enabled, this method will also return true. This test is useful for tasks that should only be run on a single member in a cluster. true if this cluster member is the senior or if clustering is not enabled.



joinedCluster
public static void joinedCluster()(Code)
Notification message indicating that this JVM has joined a cluster.



leftCluster
public static void leftCluster()(Code)
Notification message indicating that this JVM has left the cluster.



lockKey
public static void lockKey(Object key, long timeout)(Code)



setCacheTypeProperty
public static void setCacheTypeProperty(String cacheName, String type)(Code)



setMaxLifetimeProperty
public static void setMaxLifetimeProperty(String cacheName, long lifetime)(Code)
Sets a local property which overrides the maximum cache entry lifetime as configured in coherence-cache-config.xml for the supplied cache name.
Parameters:
  cacheName - the name of the cache to store a value for.
Parameters:
  lifetime - the maximum cache entry lifetime.



setMaxSizeProperty
public static void setMaxSizeProperty(String cacheName, long size)(Code)
Sets a local property which overrides the maximum cache size as configured in coherence-cache-config.xml for the supplied cache name.
Parameters:
  cacheName - the name of the cache to store a value for.
Parameters:
  size - the maximum cache size.



setMinCacheSize
public static void setMinCacheSize(String cacheName, long size)(Code)



startClustering
public static void startClustering()(Code)



stopClustering
public static void stopClustering()(Code)



unlockKey
public static void unlockKey(Object key)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.