JBoss.orgCommunity Documentation

JBoss Cache User Guide

A clustered, transactional cache

Bela Ban

Brian Stansberry

Galder Zamarreño

Daniel Huang

Release 2.1.1 Alegrias

April 2008


Preface
I. Introduction to JBoss Cache
1. Overview
1.1. What is JBoss Cache?
1.1.1. And what is Pojo Cache?
1.2. Summary of Features
1.3. Requirements
1.4. License
2. User API
2.1. API Classes
2.2. Instantiating and Starting the Cache
2.3. Caching and Retrieving Data
2.4. The Fqn Class
2.5. Stopping and Destroying the Cache
2.6. Cache Modes
2.7. Adding a CacheListener
2.8. Using Cache Loaders
2.9. Using Eviction Policies
3. Configuration
3.1. Configuration Overview
3.2. Creating a Configuration
3.2.1. Parsing an XML-based Configuration File
3.2.2. Programmatic Configuration
3.2.3. Using an IOC Framework
3.3. Composition of a Configuration Object
3.4. Dynamic Reconfiguration
3.5. Overriding the Configuration Via the Option API
4. Deploying JBoss Cache
4.1. Standalone Use / Programatic Deployment
4.2. JMX-Based Deployment in JBoss AS (JBoss AS 5.x and 4.x)
4.3. Via JBoss Microcontainer (JBoss AS 5.x)
4.4. Binding to JNDI in JBoss AS
4.5. Runtime Management Information
4.5.1. JBoss Cache MBeans
4.5.2. Registering the CacheJmxWrapper with the MBeanServer
4.5.3. JBoss Cache Statistics
4.5.4. Receiving JMX Notifications
4.5.5. Accessing Cache MBeans in a Standalone Environment
5. Version Compatibility and Interoperability
5.1. Compatibility Matrix
II. JBoss Cache Architecture
6. Architecture
6.1. Data Structures Within The Cache
6.2. SPI Interfaces
6.3. Method Invocations On Nodes
6.3.1. Interceptors
6.3.2. MethodCalls
6.3.3. InvocationContexts
6.4. Managers For Subsystems
6.4.1. RpcManager
6.4.2. BuddyManager
6.4.3. CacheLoaderManager
6.5. Marshalling And Wire Formats
6.5.1. The Marshaller Interface
6.5.2. VersionAwareMarshaller
6.5.3. CacheMarshaller200
6.6. Class Loading and Regions
7. Clustering
7.1. Cache Replication Modes
7.1.1. Local Mode
7.1.2. Replicated Caches
7.2. Invalidation
7.3. State Transfer
7.3.1. State Transfer Types
7.3.2. Byte array and streaming based state transfer
7.3.3. Full and partial state transfer
7.3.4. Transient ("in-memory") and persistent state transfer
7.3.5. Configuring State Transfer
8. Cache Loaders
8.1. The CacheLoader Interface and Lifecycle
8.2. Configuration
8.2.1. Singleton Store Configuration
8.3. Shipped Implementations
8.3.1. File system based cache loaders
8.3.2. Cache loaders that delegate to other caches
8.3.3. JDBCCacheLoader
8.3.4. TcpDelegatingCacheLoader
8.3.5. Transforming Cache Loaders
8.4. Cache Passivation
8.4.1. Cache Loader Behavior with Passivation Disabled vs. Enabled
8.5. Strategies
8.5.1. Local Cache With Store
8.5.2. Replicated Caches With All Caches Sharing The Same Store
8.5.3. Replicated Caches With Only One Cache Having A Store
8.5.4. Replicated Caches With Each Cache Having Its Own Store
8.5.5. Hierarchical Caches
8.5.6. Multiple Cache Loaders
9. Eviction Policies
9.1. Configuring Eviction Policies
9.1.1. Basic Configuration
9.1.2. Eviction Regions
9.1.3. Resident Nodes
9.1.4. Programmatic Configuration
9.2. Shipped Eviction Policies
9.2.1. LRUPolicy - Least Recently Used
9.2.2. FIFOPolicy - First In, First Out
9.2.3. MRUPolicy - Most Recently Used
9.2.4. LFUPolicy - Least Frequently Used
9.2.5. ExpirationPolicy
9.2.6. ElementSizePolicy - Eviction based on number of key/value pairs in a node
9.3. Writing Your Own Eviction Policies
9.3.1. Eviction Policy Plugin Design
9.3.2. Interfaces to implement
10. Transactions and Concurrency
10.1. Concurrent Access
10.1.1. Locks
10.1.2. Pessimistic locking
10.1.3. Optimistic Locking
10.2. Transactional Support
III. JBoss Cache Configuration References
11. Configuration References
11.1. Sample XML Configuration File
11.2. Reference table of XML attributes
12. JMX References
12.1. JBoss Cache Statistics
12.2. JMX MBean Notifications