Oracle Coherence:分布式数据管理

本文介绍如何使用Oracle Coherence提供分布式(分区)数据管理。 在下面的示例应用程序中,创建了一个名为OTV的新集群,并且在该集群的两个成员之间分配了一个名为user-map的缓存对象。

二手技术:

JDK 1.6.0_21
Maven的3.0.2
连贯性3.7.0 SolarisOS 5.10

步骤1:建立已完成的专案

创建一个Maven项目,如下所示。 (可以使用Maven或IDE插件来创建它)。

步骤2:下载相干套餐

可通过http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html下载Coherence软件包

步骤3:图书馆

首先,将Coherence库安装到Local Maven Repository,并将其描述添加到pom.xml中,如下所示。 另外,如果不使用maven,则可以将coherence.jar文件添加到classpath中。

<!-- Coherence library(from local repository) --><dependency><groupId>com.tangosol</groupId><artifactId>coherence</artifactId><version>3.7.0</version></dependency>

下面的插件可用于创建runnable-jar

<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><archive><manifest><mainClass>com.otv.exe.TestCacheExecutor</mainClass></manifest></archive></configuration><executions><execution><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin>

步骤4:建立otv-coherence-cache-config.xml

otv-coherence-cache-config.xml包含(分布式或复制的)缓存方案和缓存方案映射配置。 创建后,所有缓存映射都应添加到coherence-cache-config.xml中

<?xml version="1.0"?><cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-configcoherence-cache-config.xsd"><caching-scheme-mapping><cache-mapping><cache-name>user-map</cache-name><scheme-name>MapDistCache</scheme-name></cache-mapping></caching-scheme-mapping><caching-schemes><distributed-scheme><scheme-name>MapDistCache</scheme-name><service-name>MapDistCache</service-name><backing-map-scheme><local-scheme><unit-calculator>BINARY</unit-calculator></local-scheme></backing-map-scheme><autostart>true</autostart></distributed-scheme></caching-schemes>
</cache-config>

步骤5:创建tangosol-coherence-override.xml

tangosol-coherence-override.xml包含集群, 成员身份和可配置的缓存工厂配置。 同样在配置xml文件下面显示了集群的第一个成员。

集群的第一个成员的tangosol-coherence-override.xml:

<?xml version='1.0'?><coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd"><cluster-config><member-identity><cluster-name>OTV</cluster-name><!-- Name of the first member of the cluster --><role-name>OTV1</role-name></member-identity><unicast-listener><well-known-addresses><socket-address id="1"><!-- IP Address of the first member of the cluster --><address>x.x.x.x</address><port>8089</port></socket-address><socket-address id="2"><!-- IP Address of the second member of the cluster --><address>y.y.y.y</address><port>8089</port></socket-address></well-known-addresses><!-- Name of the first member of the cluster --><machine-id>OTV1</machine-id><!-- IP Address of the first member of the cluster --><address>x.x.x.x</address><port>8089</port><port-auto-adjust>true</port-auto-adjust></unicast-listener></cluster-config><configurable-cache-factory-config><init-params><init-param><param-type>java.lang.String</param-type><param-value system-property="tangosol.coherence.cacheconfig">otv-coherence-cache-config.xml</param-value></init-param></init-params></configurable-cache-factory-config>
</coherence>

集群的第二个成员的tangosol-coherence-override.xml:

<?xml version='1.0'?><coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd"><cluster-config><member-identity><cluster-name>OTV</cluster-name><!-- Name of the second member of the cluster --><role-name>OTV2</role-name></member-identity><unicast-listener>      <well-known-addresses><socket-address id="1"><!-- IP Address of the first member of the cluster --><address>x.x.x.x</address><port>8089</port></socket-address><socket-address id="2"><!-- IP Address of the second member of the cluster --><address>y.y.y.y</address><port>8089</port></socket-address></well-known-addresses><!-- Name of the second member of the cluster --><machine-id>OTV2</machine-id><!-- IP Address of the second member of the cluster --><address>y.y.y.y</address><port>8089</port><port-auto-adjust>true</port-auto-adjust></unicast-listener></cluster-config><configurable-cache-factory-config><init-params><init-param><param-type>java.lang.String</param-type><param-value system-property="tangosol.coherence.cacheconfig">otv-coherence-cache-config.xml</param-value></init-param></init-params></configurable-cache-factory-config></coherence>

第6步:创建用户头像

创建一个新的User bean。 该bean将分布在OTV集群中的两个节点之间。 对于序列化,已经实现了java.io.Serializable接口,但是可以实现PortableObject以获得更好的性能。

package com.otv.user;import java.io.Serializable;/*** @author onlinetechvision.com* @since 9 Oct 2011* @version 1.0.0**/
public class User implements Serializable {private static final long serialVersionUID = 1L;private String name;private String surname;public User(String name, String surname) {this.name = name;this.surname = surname;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getSurname() {return surname;}public void setSurname(String surname) {this.surname = surname;}@Overridepublic String toString() {StringBuffer strBuff = new StringBuffer();strBuff.append("name : ").append(name);strBuff.append(", surname : ").append(surname);return strBuff.toString();}
}

第7步:创建缓存类

创建一个新的TestCache类。 此类初始化分布式(已分类)数据管理,并创建一个名为user-map的缓存对象。

package com.otv;import org.apache.log4j.Logger;import com.otv.listener.UserMapListener;
import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;/*** @author onlinetechvision.com* @since 9 Oct 2011* @version 1.0.0**/
public class TestCache {private static Logger log = Logger.getLogger(TestCache.class);private static TestCache instance = null;private NamedCache cache = null;private static final String USER_MAP = "user-map";private static final long LOCK_TIMEOUT = -1;public TestCache() {setCache(CacheFactory.getCache(USER_MAP));getCache().addMapListener(new UserMapListener());}public static TestCache getInstance() {if(instance == null) {instance = new TestCache();}return instance;}public static void setInstance(TestCache instance) {TestCache.instance = instance;}public NamedCache getCache() {return cache;}public void setCache(NamedCache cache) {this.cache = cache;}public void addToCache(Object key, Object value) {// key is lockedgetCache().lock(key, LOCK_TIMEOUT);try {// application logicgetCache().put(key, value);} finally {// key is unlockedgetCache().unlock(key);}}public void deleteFromCache(Object key) {// key is lockedgetCache().lock(key, LOCK_TIMEOUT);try {// application logicgetCache().remove(key);} finally {// key is unlockedgetCache().unlock(key);}}
}

步骤8:建立UserMapListener IMPL类别

创建一个新的UserMapListener类。 该侦听器接收分布式用户映射事件。

package com.otv.listener;import org.apache.log4j.Logger;import com.tangosol.util.MapEvent;
import com.tangosol.util.MapListener;/*** @author onlinetechvision.com* @since 9 Oct 2011* @version 1.0.0**/
public class UserMapListener implements MapListener {private static Logger logger = Logger.getLogger(UserMapListener.class);public void entryDeleted(MapEvent me) {logger.debug("Deleted Key = " + me.getKey() + ", Value = " + me.getOldValue());}public void entryInserted(MapEvent me) {logger.debug("Inserted Key = " + me.getKey() + ", Value = " + me.getNewValue());}public void entryUpdated(MapEvent me) {
//  logger.debug("Updated Key = " + me.getKey() + ", New_Value = " + 
//              me.getNewValue() + ", Old Value = " + me.getOldValue());}
}

步骤9:建立TestCacheExecutor类别

创建TestCacheExecutor类以运行该应用程序。

package com.otv.exe;import java.util.Iterator;import org.apache.log4j.Logger;import com.otv.TestCache;
import com.otv.user.User;/*** @author onlinetechvision.com* @since 9 Oct 2011* @version 1.0.0**/
public class TestCacheExecutor implements Runnable {private static Logger log = Logger.getLogger(TestCacheExecutor.class);public static void main(String[] args) {try {TestCacheExecutor testCacheExecutor = new TestCacheExecutor();while (true) {testCacheExecutor.run();Thread.sleep(10000);}} catch (InterruptedException e) {e.printStackTrace();}}public void run() {execute();}public void execute() {//Entries which will be inserted via first member of the cluster so before the project is built// in order to deploy first member of the cluster, this code block should be opened and below //code block should be commented-out...User firstUser = new User("Bruce", "Willis");User secondUser = new User("Clint", "Eastwood");TestCache.getInstance().addToCache("user1", firstUser);TestCache.getInstance().addToCache("user2", secondUser);  //Entries which will be inserted via second member of the cluster so before the project is //built in order to deploy second member of the cluster, this code block should be opened //and above code block should be commented-out...//User firstUser = new User("Anna", "Kornikova");//User secondUser = new User("Natalie", "Portman");//TestCache.getInstance().addToCache("user3", firstUser);//TestCache.getInstance().addToCache("user4", secondUser);  Iterator it = TestCache.getInstance().getCache().values().iterator();log.debug("***************************************");while(it.hasNext()){User user = (User)it.next();log.debug("1. Cache Content : "+user);}log.debug("***************************************");}}

步骤10:建立专案

生成OTV_Coherence项目时,将创建OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar
注意:构建过程应分别应用于集群的每个成员。

步骤11:在集群的第一个成员上运行项目

在群集成员上运行OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar文件后,将在第一个成员的控制台上显示以下输出日志:

xxxx:第一个成员的IP地址
yyyy:第二个成员的IP地址

root@wpbxdbt # java -jar OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar
2011-10-09 21:24:42.112/2.947 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational configuration from "jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence.xml"2011-10-09 21:24:42.557/3.392 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational overrides from "jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence-override-dev.xml"2011-10-09 21:24:42.997/3.832 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational overrides from "jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence-override.xml"2011-10-09 21:24:43.029/3.864 Oracle Coherence n/a <D5> (thread=main, member=n/a): Optional configuration override "/custom-mbeans.xml" is not specifiedOracle Coherence Version n/a Build n/aGrid Edition: Development mode
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.2011-10-09 21:24:45.307/6.142 Oracle Coherence GE n/a <Info> (thread=main, member=n/a): Loaded cache configuration from "jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/otv-coherence-cache-config.xml"2011-10-09 21:24:46.934/7.769 Oracle Coherence GE n/a <D4> (thread=main, member=n/a): TCMP bound to /x.x.x.x:8089 using SystemSocketProvider2011-10-09 21:24:50.629/11.464 Oracle Coherence GE n/a <Info> (thread=Cluster, member=n/a): Created a new cluster "OTV" with Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:dbt,process:13723, Role=OTV1, Edition=Grid Edition, Mode=Development, CpuCount=64, SocketCount=64) UID=0x0AD2339700000132E9EE15572F401F992011-10-09 21:24:50.644/11.479 Oracle Coherence GE n/a <Info> (thread=main, member=n/a): Started cluster Name=OTVWellKnownAddressList(Size=2,WKA{Address=x.x.x.x, Port=8089}WKA{Address=y.y.y.y, Port=8089})MasterMemberSet(ThisMember=Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:wpbxdbt,process:13723, Role=OTV1)OldestMember=Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096,
Location=machine:wpbxdbt,process:13723, Role=OTV1)ActualMemberSet=MemberSet(Size=1, BitSetCount=2    
Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:dbt,process:13723,Role=OTV1))RecycleMillis=1200000RecycleSet=MemberSet(Size=0, BitSetCount=0))TcpRing{Connections=[]}
IpMonitor{AddressListSize=0}2011-10-09 21:24:50.773/11.608 Oracle Coherence GE n/a <D5> (thread=Invocation:Management, member=1): Service Management 
joined the cluster with senior service member 12011-10-09 21:24:52.099/12.934 Oracle Coherence GE n/a <D5> (thread=DistributedCache:MapDistCache, member=1): Service 
MapDistCache joined the cluster with senior service member 109.10.2011 21:24:52 DEBUG (UserMapListener.java:23) - Inserted Key = user1, Value = name : Bruce, surname : Willis
09.10.2011 21:24:52 DEBUG (UserMapListener.java:23) - Inserted Key = user2, Value = name : Clint, surname : Eastwood
09.10.2011 21:24:52 DEBUG (TestCacheExecutor.java:43) - ***************************************
09.10.2011 21:24:52 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Bruce, surname : Willis
09.10.2011 21:24:52 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Clint, surname : Eastwood
09.10.2011 21:24:52 DEBUG (TestCacheExecutor.java:48) - ***************************************
2011-10-09 21:25:38.881/59.716 Oracle Coherence GE n/a <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2011-10-09 
21:25:38.68, Address=y.y.y.y:8089, MachineId=12097, Location=machine:ebt,process:29580, Role=OTV2) joined Cluster with senior 
member 12011-10-09 21:25:39.122/59.957 Oracle Coherence GE n/a <D5> (thread=Cluster, member=1): Member 2 joined Service Management 
with senior member 12011-10-09 21:25:40.767/61.602 Oracle Coherence GE n/a <D5> (thread=Cluster, member=1): Member 2 joined Service MapDistCache 
with senior member 12011-10-09 21:25:40.866/61.702 Oracle Coherence GE n/a <D5> (thread=DistributedCache:MapDistCache, member=1): 1> 
Transferring vulnerable PartitionSet{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127} to member 2 requesting 128
2011-10-09 21:25:41.147/61.982 Oracle Coherence GE n/a <D4> (thread=DistributedCache:MapDistCache, member=1): 1> 
Transferring 129 out of 129 partitions to a machine-safe backup 1 at member 2 (under 129)
2011-10-09 21:25:41.233/62.068 Oracle Coherence GE n/a <D5> (thread=DistributedCache:MapDistCache, member=1): Transferring 
0KB of backup[1] for PartitionSet{128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256} to member 209.10.2011 21:25:41 DEBUG (UserMapListener.java:23) - Inserted Key = user3, Value = name : Anna, surname : Kornikova
09.10.2011 21:25:41 DEBUG (UserMapListener.java:23) - Inserted Key = user4, Value = name : Natalie, surname : Portman
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:43) - ***************************************
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Natalie, surname : Portman
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Bruce, surname : Willis
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Clint, surname : Eastwood
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Anna, surname : Kornikova
09.10.2011 21:25:42 DEBUG (TestCacheExecutor.java:48) - ***************************************

第二成员的控制台:

root@wpbxwebt # java -jar OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar
2011-10-09 21:25:37.623/3.056 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational configuration from 
"jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence.xml"2011-10-09 21:25:38.085/3.517 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational overrides from 
"jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence-override-dev.xml"2011-10-09 21:25:38.522/3.954 Oracle Coherence n/a <Info> (thread=main, member=n/a): Loaded operational overrides from "jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/tangosol-coherence-override.xml"2011-10-09 21:25:38.554/3.986 Oracle Coherence n/a <D5> (thread=main, member=n/a): Optional configuration override "/custom-
mbeans.xml" is not specifiedOracle Coherence Version n/a Build n/aGrid Edition: Development mode
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.2011-10-09 21:25:40.946/6.378 Oracle Coherence GE n/a <Info> (thread=main, member=n/a): Loaded cache configuration from 
"jar:file:/root/OTV/New/OTV_Coherence-0.0.1-SNAPSHOT-jar-with-dependencies.jar!/otv-coherence-cache-config.xml"2011-10-09 21:25:42.665/8.097 Oracle Coherence GE n/a <D4> (thread=main, member=n/a): TCMP bound to /y.y.y.y:8089 using 
SystemSocketProvider2011-10-09 21:25:43.266/8.698 Oracle Coherence GE n/a <Info> (thread=Cluster, member=n/a): Failed to satisfy the variance: 
allowed=16, actual=312011-10-09 21:25:43.266/8.698 Oracle Coherence GE n/a <Info> (thread=Cluster, member=n/a): Increasing allowable variance to 17
2011-10-09 21:25:43.599/9.031 Oracle Coherence GE n/a <Info> (thread=Cluster, member=n/a): This Member(Id=2, 
Timestamp=2011-10-09 21:25:38.68, Address=y.y.y.y:8089, MachineId=12097, Location=machine:ebt,process:29580, Role=OTV2, 
Edition=Grid Edition, Mode=Development, CpuCount=32, SocketCount=32) joined cluster "OTV" with senior Member(Id=1, 
Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:dbt,process:13723, Role=OTV1, 
Edition=Grid Edition, Mode=Development, CpuCount=64, SocketCount=64)2011-10-09 21:25:43.649/9.081 Oracle Coherence GE n/a <D5> (thread=Cluster, member=n/a): Member 1 joined Service Cluster with 
senior member 12011-10-09 21:25:43.650/9.082 Oracle Coherence GE n/a <D5> (thread=Cluster, member=n/a): Member 1 joined Service Management 
with senior member 12011-10-09 21:25:43.650/9.082 Oracle Coherence GE n/a <D5> (thread=Cluster, member=n/a): Member 1 joined Service MapDistCache 
with senior member 12011-10-09 21:25:43.656/9.088 Oracle Coherence GE n/a <Info> (thread=main, member=n/a): Started cluster Name=OTVWellKnownAddressList(Size=2,WKA{Address=y.y.y.y, Port=8089}WKA{Address=x.x.x.x, Port=8089})MasterMemberSet(ThisMember=Member(Id=2, Timestamp=2011-10-09 21:25:38.68, Address=y.y.y.y:8089, MachineId=12097, Location=machine:ebt,process:29580, Role=OTV2) 
OldestMember=Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:dbt,process:13723, Role=OTV1)ActualMemberSet=MemberSet(Size=2, BitSetCount=2Member(Id=1, Timestamp=2011-10-09 21:24:46.935, Address=x.x.x.x:8089, MachineId=12096, Location=machine:dbt,process:13723, 
Role=OTV1)Member(Id=2, Timestamp=2011-10-09 21:25:38.68, Address=y.y.y.y:8089, MachineId=12097, Location=machine:ebt,process:29580, 
Role=OTV2))RecycleMillis=1200000RecycleSet=MemberSet(Size=0, BitSetCount=0))TcpRing{Connections=[1]}
IpMonitor{AddressListSize=1}2011-10-09 21:25:43.812/9.248 Oracle Coherence GE n/a <D5> (thread=Invocation:Management, member=2): Service Management 
joined the cluster with senior service member 12011-10-09 21:25:45.230/10.662 Oracle Coherence GE n/a <D5> (thread=DistributedCache:MapDistCache, member=2): Service 
MapDistCache joined the cluster with senior service member 12011-10-09 21:25:45.482/10.914 Oracle Coherence GE n/a <D4> (thread=DistributedCache:MapDistCache, member=2): Asking member 1 
for 128 primary partitions2011-10-09 21:25:45.840/11.272 Oracle Coherence GE n/a <D5> (thread=DistributedCache:MapDistCache, member=2): Deferring the 
distribution due to 128 pending configuration updates09.10.2011 21:25:46 DEBUG (UserMapListener.java:23) - Inserted Key = user3, Value = name : Anna, surname : Kornikova
09.10.2011 21:25:46 DEBUG (UserMapListener.java:23) - Inserted Key = user4, Value = name : Natalie, surname : Portman
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:43) - ***************************************
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Anna, surname : Kornikova
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Bruce, surname : Willis
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Natalie, surname : Portman
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:46) - Distributed Cache Content : name : Clint, surname : Eastwood
09.10.2011 21:25:46 DEBUG (TestCacheExecutor.java:48) - ***************************************

步骤12:下载

OTV_Coherence

参考: Online Technology Vision博客上的JCG合作伙伴 Eren Avsarogullari提供的Oracle Coherence中的分布式数据管理 。


翻译自: https://www.javacodegeeks.com/2012/06/oracle-coherence-distributed-data.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/372408.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Ajax学习笔记

Ajax 什么是ajax AJAX即“Asynchronous JavaScript and XML”&#xff08;异步的JavaScript与XML技术&#xff09;&#xff0c;指的是一套综合了多项技术的浏览器端网页开发技术。以前&#xff0c;几乎所有的网站都由HTML页面实现&#xff0c;服务器处理每一个用户请求都需要重…

美团点评DBProxy读写分离使用说明

目的 因为业务架构上需要实现读写分离&#xff0c;刚好前段时间美团点评开源了在360Atlas基础上开发的读写分离中间件DBProxy&#xff0c;关于其介绍在官方文档已经有很详细的说明了&#xff0c;其特性主要有&#xff1a;读写分离、负载均衡、支持分表、IP过滤、sql语句黑名单、…

apriori算法c++_关联分析——基于Apriori算法实现

电子商务推荐系统主要是通过统计和挖掘技术&#xff0c;根据用户在网站上的行为,主动为用户提供推荐服务&#xff0c;从而提高网站体验。而根据不同的业务场景&#xff0c;推荐系统需要满足不同的推荐粒度&#xff0c;包括搜索推荐,商品类目推荐,商品标签推荐&#xff0c;店铺推…

在Oracle Coherence中分发Spring Bean

本文展示了如何通过使用Oracle Coherence中的EntryProcessor和可移植对象格式&#xff08;POF&#xff09;功能来分发Spring Bean。 Coherence通过EntryProcessor API支持无锁编程模型。 此功能通过减少网络访问并在条目上执行隐式的低级锁定来提高系统性能。 此隐式低级锁定功…

postman测试实例--断言

让我们来看看postman测试的一些例子。 其中大部分是作为内部postman片段。 大多数测试是为单行的JavaScript语句一样简单。 只要你想一个请求&#xff0c;你可以有很多的测试。注意&#xff1a;一个响应已从服务器接收后测试脚本运行。测试实例1.设置环境变量 postman.setEnvir…

python实现单例模式的几种方式_基于Python中单例模式的几种实现方式及优化详解...

单例模式单例模式(Singleton Pattern)是一种常用的软件设计模式&#xff0c;该模式的主要目的是确保某一个类只有一个实例存在。当你希望在整个系统中&#xff0c;某个类只能出现一个实例时&#xff0c;单例对象就能派上用场。比如&#xff0c;某个服务器程序的配置信息存放在一…

android-铃声的设置与播放

在android系统中&#xff0c;不同铃声存放的铃声路径&#xff1a;/system/media/audio/ringtones 来电铃声/system/media/audio/notifications 短信通知铃声/system/media/audio/alarms 闹钟铃声铃声的设置&#xff1a;import java.io.File; import andr…

Apache Commons SCXML:有限状态机实现

本文提到有限状态机&#xff08;FSM&#xff09;&#xff0c;SCXML&#xff08;状态图可扩展标记语言&#xff09;和Apache Common的SCXML库。 本文还提供了基本的ATM有限状态机示例代码。 有限状态机&#xff1a; 您可能还记得计算机科学课程中的有限状态机。 FSM用于设计计算…

第二十章、分离应用程序逻辑并处理事件

理解委托 委托是对方法的引用。&#xff08;之所以称为委托&#xff0c;是因为一旦被调用&#xff0c;就将具体的处理“委托”给引用的方法&#xff09; 委托对象引用了方法&#xff0c;和将int赋值给int变量一样&#xff0c;是将方法引用赋给委托对象。 Processor p new Proc…

pymol怎么做底物口袋表面_怎么从文献中发掘一篇新文章?

本文来自微信公众号&#xff1a;X-MOLNews可能你的导师也曾说过这样的话——盯着Nature、Science级别的文章做&#xff0c;可能最终会中十分的文章&#xff1b;如果盯着十分的文章做&#xff0c;可能最终发出来也就五六分&#xff1b;但如果就为了发个文章混毕业&#xff0c;很…

如何分析线程转储– IBM VM

本文是我们的线程转储分析系列的第4部分&#xff0c;它将为您概述什么是IBM VM的JVM线程转储以及您将找到的不同线程和数据点。 您将看到和学习​​到&#xff0c;IBM VM Thread Dump格式是不同的&#xff0c;但是提供了更多现成的故障排除数据。 在这一点上&#xff0c;您应该…

VMware vSphere克隆虚拟机

参考资料&#xff1a;http://blog.csdn.net/shen_jz2012/article/details/484167711. 首先将你所要克隆的虚拟机关掉2. 选择你的ESXI服务器选中"配置"&#xff0c;然后选中存储器右键你的存储介质&#xff0c;比如我的是datastore1&#xff0c;选择“浏览数据存储”。…

将本地jar包倒入maven项目类库中

有两种方法&#xff1a;1.本地下载maven并配置环境变量&#xff0c;然后运行cmd控制台输入 mvn install:install-file -Dfile本地jar路径 -DgroupId -DartifactId -Dpackagingjar -Dversion -DgeneratePomtrue. 2.直接在pom.xml中对应的依赖下面添加<scope>system&l…

Spring和JSF集成:分页

处理大型数据集时&#xff0c;通常需要以分页格式显示数据。 分页是一个有趣的问题&#xff0c;因为它倾向于跨越应用程序的所有层&#xff0c;从视图层通过应用程序服务一直到对数据库的原始调用。 在获取分页数据时&#xff0c;有一些非常好的解决方案。 如果您使用的是JPA&a…

三重积分平均值_直角坐标系下的三重积分的几何可视化解释图解高等数学

12.4 直角坐标系下的三重积分三重积分假设 F(x,y,z) 为一个空间有界闭区域 D 上的函数. D 为下面立体椭球所占区域. 将空间区域分割成小长方块. 体积记为 ΔVk, 其长宽高分别为Δxk, Δyk, Δzk , 并有下列的求和式:观察下面动画, 当空间不断分割, 每个小方块的体积 ΔVk 不断变…

最短网络Agri-Net

【例4-11】、最短网络Agri-Net【问题描述】农民约翰被选为他们镇的镇长&#xff01;他其中一个竞选承诺就是在镇上建立起互联网&#xff0c;并连接到所有的农场。当然&#xff0c;他需要你的帮助。约翰已经给他的农场安排了一条高速的网络线路&#xff0c;他想把这条线路共享给…

cors-synchronous-requests-not-working-in-firefox

http://stackoverflow.com/questions/16668386/cors-synchronous-requests-not-working-in-firefox转载于:https://www.cnblogs.com/diyunpeng/p/5829594.html

硬盘接口协议

硬盘是电脑主要的存储媒介之一&#xff0c;由一个或者多个铝制或者玻璃制的碟片组成。碟片外覆盖有铁磁性材料。硬盘有固态硬盘&#xff08;SSD 盘&#xff0c;新式硬盘&#xff09;、机械硬盘&#xff08;HDD 传统硬盘&#xff09;、混合硬盘&#xff08;HHD 一块基于传统机械…

图的表示

Python 数据结构与算法——图&#xff08;Graph&#xff09; 1. 邻接矩阵 vs 邻接表&#xff08;压缩的邻接矩阵&#xff09; 邻接矩阵的缺点是&#xff1a; 空间占用与结点数的平方成正比&#xff0c;可能带来很大的浪费&#xff1b;邻接矩阵不容易增加新的结点&#xff0c;不…

在Java Web应用程序中阻止CSRF

跨站点请求伪造攻击&#xff08;CSRF&#xff09;在Web应用程序中非常常见&#xff0c;如果允许&#xff0c;可能会造成重大危害。 如果您从未听说过CSRF&#xff0c;建议您查看有关它的OWASP页面 。 幸运的是&#xff0c;阻止CSRF攻击非常简单&#xff0c;我将向您展示它们的工…