没有合适的资源?快使用搜索试试~ 我知道了~
首页Terracotta4.0:构建分布式内存管理系统
Terracotta4.0:构建分布式内存管理系统
需积分: 10 4 下载量 10 浏览量
更新于2024-07-25
收藏 2.55MB PDF 举报
"Terracotta4.0Documentation"
Terracotta 是一个开源的技术平台,它提供了在分布式环境中管理和扩展Java应用程序内存的能力。通过 Terracotta,开发者可以将所有数据存储在内存中,跨越多台服务器,实现高可用性和可伸缩性。这使得大数据集的处理更为高效,尤其适用于需要快速访问和低延迟的应用场景。
BigMemory Max 是 Terracotta 的一个关键组件,专为处理大量数据而设计。它允许应用程序以高速缓存的形式管理大规模数据,从而显著提高性能。文档中提到的"1/427"可能是指文档总页数或部分章节编号,表示这是一个系列教程的一部分。
文档首先介绍了简单的 "Hello, World!" 示例,这是任何编程教程的常见起点,帮助用户了解如何创建配置文件、编写 HelloWorld.java 类,并执行程序。接着,教程逐步深入,展示了基本的 CRUD(创建、读取、更新、删除)操作,这对于任何数据管理系统来说都是基础。
在 CRUD 部分,用户学习如何创建配置文件、编写Crud.java类,然后执行操作。这部分内容强调了如何与 Terracotta 存储的数据进行交互。之后的章节涉及搜索功能,包括创建配置文件、Search.java 类的编写,以及执行和查看结果的步骤。
排序结果是下一个主题,用户需要创建新的配置文件和Sort.java类,以实现对检索到的数据进行排序。接着,教程还涵盖了数据分组,通过创建Group.java来演示这一过程,帮助用户理解如何对数据进行聚合和分类。
文档的后续部分介绍了如何添加 Terracotta Server Array,这是 Terracotta 集群的核心组成部分。添加服务器数组旨在提高系统的可扩展性和冗余,确保高可用性。这个过程包括准备阶段、配置文件创建、ServerArrayTest.java 类的编写,启动单个 Terracotta 服务器实例,以及执行和后续步骤。
最后,文档提供了一些代码示例,包括声明式配置(通过 XML)、编程式配置和基本的 CRUD 操作。这些示例帮助用户更好地理解和应用 Terracotta 的核心概念和功能。
Terracotta 通过 BigMemory Max 提供了一种强大的解决方案,使得在分布式环境中处理大量内存数据成为可能。这个文档为用户提供了逐步学习和实践的路径,从基础操作到高级特性,旨在帮助开发者充分利用 Terracotta 平台的优势。
Terracotta 4.0 Documentation
Terracotta Configuration Reference
Using Paths as Values...................................................................................................................277/427
Overriding tc.properties................................................................................................................277/427
Setting System Properties in tc-config...................................................................................277/427
Override Priority....................................................................................................................277/427
Failure to Override.................................................................................................................278/427
Servers Configuration Section......................................................................................................278/427
/tc:tc-config/servers................................................................................................................278/427
/tc:tc-config/servers/client-reconnect-window.......................................................................278/427
/tc:tc-config/servers/garbage-collection.................................................................................279/427
/tc:tc-config/servers/restartable..............................................................................................279/427
/tc:tc-config/servers/mirror-group..........................................................................................279/427
/tc:tc-config/servers/server.....................................................................................................280/427
/tc:tc-config/servers/server/offheap........................................................................................281/427
/tc:tc-config/servers/server/data.............................................................................................281/427
/tc:tc-config/servers/server/index...........................................................................................281/427
/tc:tc-config/servers/server/data-backup................................................................................282/427
/tc:tc-config/servers/server/logs.............................................................................................282/427
/tc:tc-config/servers/server/tsa-port........................................................................................282/427
/tc:tc-config/servers/server/jmx-port......................................................................................282/427
/tc:tc-config/servers/server/tsa-group-port.............................................................................282/427
/tc:tc-config/servers/server/security.......................................................................................283/427
/tc:tc-config/servers/server/authentication.............................................................................284/427
/tc:tc-config/servers/server/http-authentication/user-realm-file.............................................284/427
Clients Configuration Section.......................................................................................................285/427
/tc:tc-config/clients/logs.........................................................................................................285/427
Welcome to BigMemory Go....................................................................................................................286/427
BigMemory Go lets you put ALL your data in memory,.............................................................286/427
limited only by how much RAM you have............................................................................286/427
Getting Started With BigMemory Go....................................................................................................287/427
Installing BigMemory Go.............................................................................................................287/427
Configuring BigMemory Go........................................................................................................288/427
Automatic Resource Control..................................................................................................288/427
Fast Restartability...................................................................................................................289/427
Using the BigMemory Go API.....................................................................................................289/427
Search.....................................................................................................................................289/427
Transactional Caching............................................................................................................289/427
Administration and Monitoring....................................................................................................289/427
Learn More About How BigMemory Go Works..........................................................................289/427
Code Samples...........................................................................................................................................290/427
Introduction...................................................................................................................................290/427
Example 1: Declarative Configuration via XML.........................................................................290/427
Example 2: Programmatic Configuration.....................................................................................291/427
Example 3: Create, Read, Update and Delete (CRUD)................................................................291/427
Example 4: Search........................................................................................................................293/427
xv
Terracotta 4.0 Documentation
Code Samples
Example 5: Automatic Resource Control (ARC).........................................................................295/427
Example 6: Using BigMemory As a Cache..................................................................................295/427
Configuration Overview..........................................................................................................................297/427
Introduction...................................................................................................................................297/427
XML Configuration......................................................................................................................297/427
Dynamically Changing Cache Configuration...............................................................................297/427
Passing Copies Instead of References..........................................................................................298/427
Special System Properties.............................................................................................................299/427
net.sf.ehcache.disabled...........................................................................................................299/427
net.sf.ehcache.use.classic.lru..................................................................................................299/427
ehcache.xsd...................................................................................................................................299/427
ehcache-failsafe.xml.....................................................................................................................299/427
About Default Cache..............................................................................................................300/427
More Information on Configuration Topics.................................................................................300/427
Storage Tiers Basics.................................................................................................................................301/427
Introduction...................................................................................................................................301/427
Memory Store...............................................................................................................................301/427
Off-Heap Store..............................................................................................................................301/427
Allocating Direct Memory in the JVM..................................................................................302/427
Tuning Off-Heap Store Performance.....................................................................................303/427
Disk Store.....................................................................................................................................305/427
Serialization............................................................................................................................305/427
Storage Options......................................................................................................................305/427
Storage Tiers Advanced..........................................................................................................................306/427
Introduction...................................................................................................................................306/427
Configuring the Memory Store.....................................................................................................306/427
Memory Use, Spooling, and Expiry Strategy in the Memory Store......................................306/427
Configuring the Off-Heap Store...................................................................................................307/427
Declarative Configuration......................................................................................................307/427
Programmatic Configuration..................................................................................................308/427
Configuring the Disk Store...........................................................................................................308/427
Disk-Store Storage Options....................................................................................................308/427
Disk Store Configuration Element.........................................................................................309/427
Disk Store Expiry and Eviction..............................................................................................309/427
Turning off Disk Stores..........................................................................................................310/427
Configuration Examples...............................................................................................................310/427
Sizing Storage Tiers.................................................................................................................................312/427
Introduction...................................................................................................................................312/427
Sizing Attributes...........................................................................................................................312/427
Pooling Resources Versus Sizing Individual Data Sets................................................................312/427
Memory Store (Heap).............................................................................................................313/427
Off-Heap Store.......................................................................................................................313/427
Disk Store...............................................................................................................................313/427
xvi
Terracotta 4.0 Documentation
Sizing Storage Tiers
Sizing Examples...........................................................................................................................314/427
Pooled Resources...................................................................................................................314/427
Explicitly Sizing Data Sets.....................................................................................................314/427
Mixed Sizing Configurations.................................................................................................315/427
Using Percents........................................................................................................................315/427
Sizing Data Sets Without a Pool............................................................................................316/427
Overflows...............................................................................................................................316/427
Overriding Size Limitations.........................................................................................................317/427
Built-In Sizing Computation and Enforcement............................................................................317/427
Sizing of Data Set Entries......................................................................................................317/427
Eviction When Using CacheManager-Level Storage............................................................319/427
Pinning, Expiration, and Eviction..........................................................................................................321/427
Introduction...................................................................................................................................321/427
Setting Expiration.........................................................................................................................321/427
Pinning Data.................................................................................................................................321/427
Pinning Individual Cache Entries...........................................................................................322/427
Pinning a Cache......................................................................................................................322/427
Scope of Pinning....................................................................................................................323/427
How Configuration Affects Element Flushing and Eviction........................................................323/427
Pinning Overrides Cache Sizing............................................................................................323/427
Data Freshness and Expiration.....................................................................................................324/427
Fast Restartability....................................................................................................................................325/427
Introduction...................................................................................................................................325/427
Data Persistence Implementation..................................................................................................325/427
Strategy Options.....................................................................................................................325/427
Synchronous Writes Options..................................................................................................326/427
Disk Store Path.......................................................................................................................326/427
Configuration Examples...............................................................................................................326/427
Options for Crash Resilience..................................................................................................326/427
Temporary Disk Storage........................................................................................................327/427
In-memory Only.....................................................................................................................327/427
Programmatic Configuration Example...................................................................................327/427
Fast Restart Performance..............................................................................................................328/427
Fast Restart Limitations................................................................................................................328/427
Key Classes and Methods of the BigMemory Go API..........................................................................329/427
Introduction...................................................................................................................................329/427
CacheManager..............................................................................................................................329/427
CacheManager Creation Modes.............................................................................................329/427
Cache............................................................................................................................................330/427
Element.........................................................................................................................................330/427
BigMemory Go Search API....................................................................................................................332/427
Introduction...................................................................................................................................332/427
What is Searchable?...............................................................................................................332/427
xvii
Terracotta 4.0 Documentation
BigMemory Go Search API
Making a Cache Searchable..........................................................................................................332/427
By Configuration....................................................................................................................332/427
Defining Attributes.......................................................................................................................333/427
Well-known Attributes...........................................................................................................334/427
Creating a Query...........................................................................................................................335/427
Using Attributes in Queries....................................................................................................335/427
Expressions.............................................................................................................................335/427
List of Operators.....................................................................................................................336/427
Making Queries Immutable....................................................................................................336/427
Obtaining and Organizing Query Results.....................................................................................336/427
Aggregators............................................................................................................................337/427
Ordering Results.....................................................................................................................337/427
Grouping Results....................................................................................................................337/427
Limiting the Size of Results...................................................................................................338/427
Interrogating Results..............................................................................................................338/427
Finding Null (or Not Null) Values.........................................................................................339/427
Sample Application......................................................................................................................339/427
Scripting Environments................................................................................................................339/427
Implementation and Performance.................................................................................................339/427
Best Practices for Optimizing Searches........................................................................................340/427
Concurrency Notes.................................................................................................................341/427
Transactions in Ehcache.........................................................................................................................342/427
Introduction...................................................................................................................................342/427
All or nothing.........................................................................................................................342/427
Change Visibility....................................................................................................................342/427
When to use transactional modes..................................................................................................342/427
Requirements................................................................................................................................342/427
Configuration................................................................................................................................343/427
Transactional Caches with Spring..........................................................................................343/427
Global Transactions......................................................................................................................343/427
Implementation.......................................................................................................................343/427
Failure Recovery...........................................................................................................................344/427
Recovery.................................................................................................................................344/427
Sample Apps.................................................................................................................................344/427
XA Sample App.....................................................................................................................344/427
XA Banking Application........................................................................................................345/427
Examinator.............................................................................................................................345/427
Transaction Managers...................................................................................................................345/427
Automatically Detected Transaction Managers.....................................................................345/427
Configuring a Transaction Manager......................................................................................346/427
Local Transactions........................................................................................................................346/427
Introduction Video.................................................................................................................346/427
Configuration.........................................................................................................................347/427
Isolation Level........................................................................................................................347/427
Transaction Timeouts.............................................................................................................347/427
Sample Code..........................................................................................................................347/427
xviii
Terracotta 4.0 Documentation
Transactions in Ehcache
Performance..................................................................................................................................347/427
Managing Contention.............................................................................................................347/427
What granularity of locking is used?......................................................................................348/427
Performance Comparisons.....................................................................................................348/427
FAQ..............................................................................................................................................348/427
Why do some threads regularly time out and throw an exception?.......................................348/427
Is IBM Websphere Transaction Manager supported?............................................................348/427
How do transactions interact with Write-behind and Write-through caches?.......................349/427
Are Hibernate Transactions supported?.................................................................................349/427
How do I make WebLogic 10 work with transactional Ehcache?.........................................349/427
How do I make Atomikos work with the Ehcache xa mode?................................................349/427
Explicit Locking.......................................................................................................................................350/427
Introduction...................................................................................................................................350/427
The API.........................................................................................................................................350/427
Example........................................................................................................................................351/427
How it works.................................................................................................................................351/427
Blocking Cache and Self-Populating Cache..........................................................................................353/427
Introduction...................................................................................................................................353/427
Blocking Cache.............................................................................................................................353/427
SelfPopulatingCache.....................................................................................................................353/427
Cache Decorators.....................................................................................................................................354/427
Introduction...................................................................................................................................354/427
Creating a Decorator.....................................................................................................................354/427
Programmatically...................................................................................................................354/427
By Configuration....................................................................................................................354/427
Adding decorated caches to the CacheManager...........................................................................354/427
Using CacheManager.replaceCacheWithDecoratedCache().................................................355/427
Using CacheManager.addDecoratedCache().........................................................................355/427
Built-in Decorators.......................................................................................................................356/427
BlockingCache.......................................................................................................................356/427
SelfPopulatingCache..............................................................................................................356/427
Caches with Exception Handling...........................................................................................356/427
Event Listeners.........................................................................................................................................357/427
CacheManager Event Listeners....................................................................................................357/427
Configuration.........................................................................................................................357/427
Implementing a CacheManager Event Listener Factory and CacheManager Event
Listener...........................................................................................................................357/427
Cache Event Listeners..................................................................................................................359/427
Configuration.........................................................................................................................359/427
Implementing a Cache Event Listener Factory and Cache Event Listener............................360/427
Adding a Listener Programmatically.....................................................................................362/427
xix
剩余450页未读,继续阅读
2014-02-17 上传
2012-08-10 上传
2010-07-18 上传
2014-05-12 上传
2014-02-17 上传
2010-04-07 上传
dzj2046
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SSM Java项目:StudentInfo 数据管理与可视化分析
- pyedgar:Python库简化EDGAR数据交互与文档下载
- Node.js环境下wfdb文件解码与实时数据处理
- phpcms v2.2企业级网站管理系统发布
- 美团饿了么优惠券推广工具-uniapp源码
- 基于红外传感器的会议室实时占用率测量系统
- DenseNet-201预训练模型:图像分类的深度学习工具箱
- Java实现和弦移调工具:Transposer-java
- phpMyFAQ 2.5.1 Beta多国语言版:技术项目源码共享平台
- Python自动化源码实现便捷自动下单功能
- Android天气预报应用:查看多城市详细天气信息
- PHPTML类:简化HTML页面创建的PHP开源工具
- Biovec在蛋白质分析中的应用:预测、结构和可视化
- EfficientNet-b0深度学习工具箱模型在MATLAB中的应用
- 2024年河北省技能大赛数字化设计开发样题解析
- 笔记本USB加湿器:便携式设计解决方案
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功