GEODE-14: Fix Rat (license header) issues for the Hibernate module
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ed3be77d Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ed3be77d Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ed3be77d Branch: refs/heads/feature/GEODE-14 Commit: ed3be77deda266539d8c5630845e8b9a25c8fc36 Parents: 79409be Author: Jens Deppe <[email protected]> Authored: Mon Dec 28 07:23:45 2015 -0800 Committer: Jens Deppe <[email protected]> Committed: Mon Dec 28 07:23:45 2015 -0800 ---------------------------------------------------------------------- extensions/gemfire-modules-hibernate/pom.xml | 109 ----- .../gemfire/modules/hibernate/EnumType.java | 23 +- .../gemfire/modules/hibernate/GemFireCache.java | 467 ++++++++++--------- .../modules/hibernate/GemFireCacheListener.java | 23 +- .../modules/hibernate/GemFireCacheProvider.java | 391 ++++++++-------- .../hibernate/GemFireQueryCacheFactory.java | 67 +-- .../modules/hibernate/GemFireRegionFactory.java | 23 +- .../modules/hibernate/internal/Access.java | 23 +- .../ClientServerRegionFactoryDelegate.java | 23 +- .../hibernate/internal/CollectionAccess.java | 23 +- .../hibernate/internal/EntityRegionWriter.java | 23 +- .../hibernate/internal/EntityVersion.java | 16 + .../hibernate/internal/EntityVersionImpl.java | 23 +- .../hibernate/internal/EntityWrapper.java | 23 +- .../hibernate/internal/GemFireBaseRegion.java | 23 +- .../internal/GemFireCollectionRegion.java | 23 +- .../hibernate/internal/GemFireEntityRegion.java | 23 +- .../internal/GemFireQueryResultsRegion.java | 23 +- .../modules/hibernate/internal/KeyWrapper.java | 23 +- .../internal/NonStrictReadWriteAccess.java | 23 +- .../hibernate/internal/ReadOnlyAccess.java | 23 +- .../hibernate/internal/ReadWriteAccess.java | 23 +- .../internal/RegionFactoryDelegate.java | 23 +- .../hibernate/internal/TransactionalAccess.java | 17 +- .../src/test/hydra/hibe/Event.hbm.xml | 16 - .../src/test/hydra/hibe/Event.java | 58 --- .../src/test/hydra/hibe/HibernateBB.java | 63 --- .../src/test/hydra/hibe/HibernatePrms.java | 44 -- .../src/test/hydra/hibe/HibernateTest.java | 418 ----------------- .../src/test/hydra/hibe/HibernateTest2.java | 155 ------ .../src/test/hydra/hibe/Person.hbm.xml | 21 - .../src/test/hydra/hibe/Person.java | 63 --- .../src/test/hydra/hibe/hibe.bt | 33 -- .../src/test/hydra/hibe/hibe.inc | 128 ----- .../src/test/hydra/hibe/hibe1.conf | 12 - .../src/test/hydra/hibe/hibernate.bt | 8 - .../src/test/hydra/readme.txt | 48 -- .../com/gemstone/gemfire/modules/Event.java | 25 +- .../gemfire/modules/HibernateJUnitTest.java | 23 +- .../com/gemstone/gemfire/modules/Owner.java | 23 +- .../com/gemstone/gemfire/modules/Person.java | 23 +- .../gemstone/gemfire/modules/SecondVMTest.java | 23 +- .../com/gemstone/gemfire/modules/Event.hbm.xml | 16 + .../com/gemstone/gemfire/modules/Person.hbm.xml | 16 + .../test/resources/tomcat/conf/tomcat-users.xml | 3 - gradle/rat.gradle | 1 + 46 files changed, 910 insertions(+), 1791 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/pom.xml ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/pom.xml b/extensions/gemfire-modules-hibernate/pom.xml deleted file mode 100644 index 19241b7..0000000 --- a/extensions/gemfire-modules-hibernate/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>com.gemstone</groupId> - <artifactId>gemfire-modules-hibernate</artifactId> - <version>${gemfire.modules.version}</version> - <packaging>jar</packaging> - - <name>gemfire-modules-hibernate</name> - <url>http://maven.apache.org</url> - - <parent> - <groupId>com.gemstone</groupId> - <artifactId>gemfire-modules-parent</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> - <dependency> - <groupId>org.apache.tomcat</groupId> - <artifactId>catalina</artifactId> - </dependency> - <dependency> - <groupId>org.apache.tomcat</groupId> - <artifactId>catalina-ha</artifactId> - <version>${tomcat.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.gemstone.gemfire</groupId> - <artifactId>gemfire</artifactId> - </dependency> - <dependency> - <groupId>com.gemstone</groupId> - <artifactId>gemfire-modules</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-core</artifactId> - <version>3.5.0-Final</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.hsqldb</groupId> - <artifactId>hsqldb</artifactId> - <version>2.0.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.javassist</groupId> - <artifactId>javassist</artifactId> - <version>3.13.0-GA</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-jdk14</artifactId> - </dependency> - <dependency> - <groupId>org.apache.tomcat</groupId> - <artifactId>coyote</artifactId> - </dependency> - <dependency> - <groupId>org.httpunit</groupId> - <artifactId>httpunit</artifactId> - </dependency> - <dependency> - <groupId>rhino</groupId> - <artifactId>js</artifactId> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-annotations</artifactId> - <version>3.5.5-Final</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.7.2</version> - <configuration> - <includes> - <include>**/HibernateTestCase.java</include> - <include>**/SecondVMTest.java</include> - </includes> - <runOrder>alphabetical</runOrder> - </configuration> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java index 86153ed..55b824c 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/EnumType.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate; import java.io.Serializable; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java index 119e137..7548061 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCache.java @@ -1,229 +1,238 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ -package com.gemstone.gemfire.modules.hibernate; - -import java.util.Map; - -import org.hibernate.cache.Cache; -import org.hibernate.cache.CacheException; -import org.hibernate.cache.Timestamper; - -import com.gemstone.gemfire.cache.EntryNotFoundException; -import com.gemstone.gemfire.cache.Region; -import com.gemstone.gemfire.cache.Scope; -import com.gemstone.gemfire.distributed.DistributedLockService; -import com.gemstone.gemfire.internal.cache.LocalRegion; - -public class GemFireCache implements Cache { - private Region region; - - private boolean clientRegion = false; - - private final DistributedLockService distributedLockService; - - public GemFireCache(Region region, DistributedLockService lockService) { - this.region = region; - this.distributedLockService = lockService; - this.clientRegion = isClient(region); - } - - private boolean isClient(Region region) { - return region.getAttributes().getPoolName() != null; - } - - /** - * Clear the cache - */ - public void clear() throws CacheException { - GemFireCacheProvider.getLogger().info("GemFireCache: clear called"); - region.clear(); - } - - /** - * Clean up - */ - public void destroy() throws CacheException { - GemFireCacheProvider.getLogger().info("GemFireCache: destroy called"); - region.localDestroyRegion(); - } - - /** - * Get an item from the cache - * - * @param key - * @return the cached object or <tt>null</tt> - * @throws CacheException - */ - public Object get(Object key) throws CacheException { - GemFireCacheProvider.getLogger().debug( - "GemFireCache: get called for: " + key); - try { - Object value = region.get(key); - GemFireCacheProvider.getLogger().debug( - "GemFireCache: retrieved: " + key + "-->" + value); - return value; - } - catch (com.gemstone.gemfire.cache.CacheException e) { - throw new CacheException(e); - } - } - - /** - * The count of entries currently contained in the regions in-memory store. - * - * @return The count of entries in memory; -1 if unknown or unsupported. - */ - public long getElementCountInMemory() { - return ((LocalRegion)region).entryCount(); - } - - /** - * The count of entries currently contained in the regions disk store. - * - * @return The count of entries on disk; -1 if unknown or unsupported. - */ - public long getElementCountOnDisk() { - return -1; - } - - /** - * Get the name of the cache region - */ - public String getRegionName() { - return region.getName(); - } - - /** - * The number of bytes is this cache region currently consuming in memory. - * - * @return The number of bytes consumed by this region; -1 if unknown or - * unsupported. - */ - public long getSizeInMemory() { - return -1; - } - - /** - * Return the lock timeout for this cache. - */ - public int getTimeout() { - GemFireCacheProvider.getLogger().debug("GemFireCache: getTimeout"); - return Timestamper.ONE_MS * 60000; - } - - /** - * If this is a clustered cache, lock the item - */ - public void lock(Object key) throws CacheException { - GemFireCacheProvider.getLogger().info( - "GemFireCache: lock called for: " + key); - - if (!clientRegion) { - // If we're using GLOBAL scope, we don't have to worry about - // locking. - if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) { - this.distributedLockService.lock(key, -1, -1); - } - } - else { - // We assume the server region is GLOBAL for now. Else, use command - // pattern to acquire lock on the server - GemFireCacheProvider.getLogger().info( - "GemFireCache: client region, ignoring lock : " + key); - } - } - - /** - * Generate the next timestamp - */ - public long nextTimestamp() { - GemFireCacheProvider.getLogger().debug("GemFireCache: nextTimestamp called"); - // TODO : Need a counter, cache-wide - return Timestamper.next(); - } - - /** - * Add an item to the cache - * - * @param key - * @param value - * @throws CacheException - */ - public void put(Object key, Object value) throws CacheException { - GemFireCacheProvider.getLogger().debug( - "GemFireCache: put called for key: " + key + "value: " + value); - try { - region.put(key, value); - GemFireCacheProvider.getLogger().debug( - "GemFireCache: put " + key + "-->" + value); - } - catch (com.gemstone.gemfire.cache.CacheException e) { - throw new CacheException(e); - } - } - - public Object read(Object key) throws CacheException { - GemFireCacheProvider.getLogger().info( - "GemFireCache: read called for: " + key); - return region.get(key); - } - - /** - * Remove an item from the cache - */ - public void remove(Object key) throws CacheException { - GemFireCacheProvider.getLogger().debug( - "GemFireCache: remove called for: " + key); - try { - region.destroy(key); - GemFireCacheProvider.getLogger().debug("GemFireCache: removed: " + key); - } - catch (EntryNotFoundException e) { - // We can silently ignore this - } - catch (com.gemstone.gemfire.cache.CacheException e) { - throw new CacheException(e); - } - } - - public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append("Hibernate cache on GemFire region: "); - buffer.append(region); - return buffer.toString(); - } - - /** - * If this is a clustered cache, unlock the item - */ - public void unlock(Object key) throws CacheException { - GemFireCacheProvider.getLogger().info( - "GemFireCache: unlock called for: " + key); - - if (!clientRegion) { - // If we're using GLOBAL scope, we don't have to worry about locking. - if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) { - this.distributedLockService.unlock(key); - } - } - else { - GemFireCacheProvider.getLogger().info( - "GemFireCache: client region, ignoring lock : " + key); - } - } - - public void update(Object key, Object value) throws CacheException { - GemFireCacheProvider.getLogger().info( - "GemFireCache: update called for: " + key); - this.region.put(key, value); - } - - public Map<?, ?> toMap() { - return null; - } -} +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.gemstone.gemfire.modules.hibernate; + +import java.util.Map; + +import org.hibernate.cache.Cache; +import org.hibernate.cache.CacheException; +import org.hibernate.cache.Timestamper; + +import com.gemstone.gemfire.cache.EntryNotFoundException; +import com.gemstone.gemfire.cache.Region; +import com.gemstone.gemfire.cache.Scope; +import com.gemstone.gemfire.distributed.DistributedLockService; +import com.gemstone.gemfire.internal.cache.LocalRegion; + +public class GemFireCache implements Cache { + private Region region; + + private boolean clientRegion = false; + + private final DistributedLockService distributedLockService; + + public GemFireCache(Region region, DistributedLockService lockService) { + this.region = region; + this.distributedLockService = lockService; + this.clientRegion = isClient(region); + } + + private boolean isClient(Region region) { + return region.getAttributes().getPoolName() != null; + } + + /** + * Clear the cache + */ + public void clear() throws CacheException { + GemFireCacheProvider.getLogger().info("GemFireCache: clear called"); + region.clear(); + } + + /** + * Clean up + */ + public void destroy() throws CacheException { + GemFireCacheProvider.getLogger().info("GemFireCache: destroy called"); + region.localDestroyRegion(); + } + + /** + * Get an item from the cache + * + * @param key + * @return the cached object or <tt>null</tt> + * @throws CacheException + */ + public Object get(Object key) throws CacheException { + GemFireCacheProvider.getLogger().debug( + "GemFireCache: get called for: " + key); + try { + Object value = region.get(key); + GemFireCacheProvider.getLogger().debug( + "GemFireCache: retrieved: " + key + "-->" + value); + return value; + } + catch (com.gemstone.gemfire.cache.CacheException e) { + throw new CacheException(e); + } + } + + /** + * The count of entries currently contained in the regions in-memory store. + * + * @return The count of entries in memory; -1 if unknown or unsupported. + */ + public long getElementCountInMemory() { + return ((LocalRegion)region).entryCount(); + } + + /** + * The count of entries currently contained in the regions disk store. + * + * @return The count of entries on disk; -1 if unknown or unsupported. + */ + public long getElementCountOnDisk() { + return -1; + } + + /** + * Get the name of the cache region + */ + public String getRegionName() { + return region.getName(); + } + + /** + * The number of bytes is this cache region currently consuming in memory. + * + * @return The number of bytes consumed by this region; -1 if unknown or + * unsupported. + */ + public long getSizeInMemory() { + return -1; + } + + /** + * Return the lock timeout for this cache. + */ + public int getTimeout() { + GemFireCacheProvider.getLogger().debug("GemFireCache: getTimeout"); + return Timestamper.ONE_MS * 60000; + } + + /** + * If this is a clustered cache, lock the item + */ + public void lock(Object key) throws CacheException { + GemFireCacheProvider.getLogger().info( + "GemFireCache: lock called for: " + key); + + if (!clientRegion) { + // If we're using GLOBAL scope, we don't have to worry about + // locking. + if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) { + this.distributedLockService.lock(key, -1, -1); + } + } + else { + // We assume the server region is GLOBAL for now. Else, use command + // pattern to acquire lock on the server + GemFireCacheProvider.getLogger().info( + "GemFireCache: client region, ignoring lock : " + key); + } + } + + /** + * Generate the next timestamp + */ + public long nextTimestamp() { + GemFireCacheProvider.getLogger().debug("GemFireCache: nextTimestamp called"); + // TODO : Need a counter, cache-wide + return Timestamper.next(); + } + + /** + * Add an item to the cache + * + * @param key + * @param value + * @throws CacheException + */ + public void put(Object key, Object value) throws CacheException { + GemFireCacheProvider.getLogger().debug( + "GemFireCache: put called for key: " + key + "value: " + value); + try { + region.put(key, value); + GemFireCacheProvider.getLogger().debug( + "GemFireCache: put " + key + "-->" + value); + } + catch (com.gemstone.gemfire.cache.CacheException e) { + throw new CacheException(e); + } + } + + public Object read(Object key) throws CacheException { + GemFireCacheProvider.getLogger().info( + "GemFireCache: read called for: " + key); + return region.get(key); + } + + /** + * Remove an item from the cache + */ + public void remove(Object key) throws CacheException { + GemFireCacheProvider.getLogger().debug( + "GemFireCache: remove called for: " + key); + try { + region.destroy(key); + GemFireCacheProvider.getLogger().debug("GemFireCache: removed: " + key); + } + catch (EntryNotFoundException e) { + // We can silently ignore this + } + catch (com.gemstone.gemfire.cache.CacheException e) { + throw new CacheException(e); + } + } + + public String toString() { + StringBuffer buffer = new StringBuffer(); + buffer.append("Hibernate cache on GemFire region: "); + buffer.append(region); + return buffer.toString(); + } + + /** + * If this is a clustered cache, unlock the item + */ + public void unlock(Object key) throws CacheException { + GemFireCacheProvider.getLogger().info( + "GemFireCache: unlock called for: " + key); + + if (!clientRegion) { + // If we're using GLOBAL scope, we don't have to worry about locking. + if (!Scope.GLOBAL.equals(region.getAttributes().getScope())) { + this.distributedLockService.unlock(key); + } + } + else { + GemFireCacheProvider.getLogger().info( + "GemFireCache: client region, ignoring lock : " + key); + } + } + + public void update(Object key, Object value) throws CacheException { + GemFireCacheProvider.getLogger().info( + "GemFireCache: update called for: " + key); + this.region.put(key, value); + } + + public Map<?, ?> toMap() { + return null; + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java index fb6db2d..e684c7d 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheListener.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate; import java.util.Properties; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java index 9e38d7f..9cd6c88 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java @@ -1,191 +1,200 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ -package com.gemstone.gemfire.modules.hibernate; - -import com.gemstone.gemfire.cache.CacheFactory; -import com.gemstone.gemfire.cache.Region; -import com.gemstone.gemfire.cache.RegionShortcut; -import com.gemstone.gemfire.cache.execute.FunctionService; -import com.gemstone.gemfire.distributed.DistributedLockService; -import com.gemstone.gemfire.internal.logging.LogService; -import com.gemstone.gemfire.modules.util.CreateRegionFunction; -import com.gemstone.gemfire.modules.util.RegionConfiguration; -import org.apache.logging.log4j.Logger; -import org.hibernate.cache.Cache; -import org.hibernate.cache.CacheException; -import org.hibernate.cache.CacheProvider; -import org.hibernate.cache.Timestamper; - -import java.util.Iterator; -import java.util.Properties; - -@SuppressWarnings("deprecation") -public class GemFireCacheProvider implements CacheProvider { - - private static final Logger logger = LogService.getLogger(); - - protected com.gemstone.gemfire.cache.Cache _cache; - - private DistributedLockService distributedLockService; - - private Properties regionAttributes = new Properties(); - - private final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU - .name(); - - private final String HIBERNATE_DLOCK_SERVICE_NAME = "hibernate-cache-lock-service"; - /** - * Configure the cache - * - * @param regionName - * the name of the cache region - * @param properties - * configuration settings - * @throws CacheException - */ - public Cache buildCache(String regionName, Properties properties) - throws CacheException { - logger.info("GemFireCacheProvider: Creating cache: " + regionName); - Region region = retrieveOrCreateRegion(regionName); - Cache cache = null; - if (region == null) { - // Doh, blow up - throw new RuntimeException("Couldn't find cache region : " + regionName); - } - else { - cache = new GemFireCache(region, this.distributedLockService); - } - logger.info("GemFireCacheProvider: Created cache: " + regionName + "->" + cache); - return cache; - } - - public boolean isMinimalPutsEnabledByDefault() { - return false; - } - - /** - * Generate a timestamp - */ - public long nextTimestamp() { - return Timestamper.next(); - } - - /** - * Returns the region if already created, otherwise first tries to create it - * from cache.xml, if not specified in cache.xml, create the region from the - * properties specified in hibernate.cfg.xml. Two types of properties can be - * specified in hibernate.cfg.xml - * <ol> - * <li>gemfire.default-region-attributes-id: the default region type to - * create. (default value for this is REPLICATE) - * <li>gemfire.region-attributes-for:fullyQualifiedRegionName when a region - * wants to override the default region type - * </ol> - * - * @param regionName - * @return the region - */ - protected Region retrieveOrCreateRegion(String regionName) { - // TODO client regions - Region r = _cache.getRegion(regionName); - if (r == null) { - String regionType = getRegionType(regionName); - r = _cache.createRegionFactory(RegionShortcut.valueOf(regionType)) - .create(regionName); - RegionConfiguration regionConfig = new RegionConfiguration(); - regionConfig.setRegionName(regionName); - regionConfig.setRegionAttributesId(regionType); - FunctionService.onMembers(_cache.getDistributedSystem()) - .withArgs(regionConfig).execute(CreateRegionFunction.ID).getResult(); - } - return r; - } - - /** - * returns the type of region to create by consulting the properties specified - * in hibernate.cfg.xml - * - * @see #retrieveOrCreateRegion(String) - * @param regionName - * @return string representation of {@link RegionShortcut} - */ - private String getRegionType(String regionName) { - String rType = regionAttributes - .getProperty("gemfire.default-region-attributes-id"); - if (rType == null) { - rType = DEFAULT_REGION_TYPE; - } - // iterate to find overridden property for a region - Iterator<Object> it = regionAttributes.keySet().iterator(); - while (it.hasNext()) { - String current = (String)it.next(); - if (current.contains(regionName)) { - rType = regionAttributes.getProperty(current); - break; - } - } - return rType.toUpperCase(); - } - - /** - * Callback to perform any necessary initialization of the underlying cache - * implementation during SessionFactory construction. - * - * @param properties - * current configuration settings. - */ - public void start(Properties properties) throws CacheException { - logger.info("GemFireCacheProvider: Creating cache provider"); - - // We have to strip out any unknown properties, do so here - Properties gemfireOnlyProperties = new Properties(); - for (Object keyObj : properties.keySet()) { - String key = (String)keyObj; - if (key.contains("region-attributes")) { - regionAttributes.put(key, properties.get(key)); - } - else if (key.startsWith("gemfire.")) { - gemfireOnlyProperties.setProperty(key.replace("gemfire.", ""), - properties.getProperty(key)); - } - } - - // Create cache and d-lock service - try { - _cache = new CacheFactory(gemfireOnlyProperties).create(); - DistributedLockService existing = DistributedLockService.getServiceNamed(HIBERNATE_DLOCK_SERVICE_NAME); - if (existing == null) { - this.distributedLockService = DistributedLockService.create( - HIBERNATE_DLOCK_SERVICE_NAME, _cache.getDistributedSystem()); - } else { - this.distributedLockService = existing; - } - } - catch (com.gemstone.gemfire.cache.CacheException e) { - throw new CacheException(e); - } - - FunctionService.registerFunction(new CreateRegionFunction()); - - logger.info("GemFireCacheProvider: Done creating cache provider"); - } - - /** - * Callback to perform any necessary cleanup of the underlying cache - * implementation during SessionFactory.close(). - */ - public void stop() { - logger.info("GemFireCacheProvider: Stopping"); - _cache.close(); - logger.info("GemFireCacheProvider: Stopped"); - } - - public static Logger getLogger() { - return logger; - } -} \ No newline at end of file +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.gemstone.gemfire.modules.hibernate; + +import com.gemstone.gemfire.cache.CacheFactory; +import com.gemstone.gemfire.cache.Region; +import com.gemstone.gemfire.cache.RegionShortcut; +import com.gemstone.gemfire.cache.execute.FunctionService; +import com.gemstone.gemfire.distributed.DistributedLockService; +import com.gemstone.gemfire.internal.logging.LogService; +import com.gemstone.gemfire.modules.util.CreateRegionFunction; +import com.gemstone.gemfire.modules.util.RegionConfiguration; +import org.apache.logging.log4j.Logger; +import org.hibernate.cache.Cache; +import org.hibernate.cache.CacheException; +import org.hibernate.cache.CacheProvider; +import org.hibernate.cache.Timestamper; + +import java.util.Iterator; +import java.util.Properties; + +@SuppressWarnings("deprecation") +public class GemFireCacheProvider implements CacheProvider { + + private static final Logger logger = LogService.getLogger(); + + protected com.gemstone.gemfire.cache.Cache _cache; + + private DistributedLockService distributedLockService; + + private Properties regionAttributes = new Properties(); + + private final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU + .name(); + + private final String HIBERNATE_DLOCK_SERVICE_NAME = "hibernate-cache-lock-service"; + /** + * Configure the cache + * + * @param regionName + * the name of the cache region + * @param properties + * configuration settings + * @throws CacheException + */ + public Cache buildCache(String regionName, Properties properties) + throws CacheException { + logger.info("GemFireCacheProvider: Creating cache: " + regionName); + Region region = retrieveOrCreateRegion(regionName); + Cache cache = null; + if (region == null) { + // Doh, blow up + throw new RuntimeException("Couldn't find cache region : " + regionName); + } + else { + cache = new GemFireCache(region, this.distributedLockService); + } + logger.info("GemFireCacheProvider: Created cache: " + regionName + "->" + cache); + return cache; + } + + public boolean isMinimalPutsEnabledByDefault() { + return false; + } + + /** + * Generate a timestamp + */ + public long nextTimestamp() { + return Timestamper.next(); + } + + /** + * Returns the region if already created, otherwise first tries to create it + * from cache.xml, if not specified in cache.xml, create the region from the + * properties specified in hibernate.cfg.xml. Two types of properties can be + * specified in hibernate.cfg.xml + * <ol> + * <li>gemfire.default-region-attributes-id: the default region type to + * create. (default value for this is REPLICATE) + * <li>gemfire.region-attributes-for:fullyQualifiedRegionName when a region + * wants to override the default region type + * </ol> + * + * @param regionName + * @return the region + */ + protected Region retrieveOrCreateRegion(String regionName) { + // TODO client regions + Region r = _cache.getRegion(regionName); + if (r == null) { + String regionType = getRegionType(regionName); + r = _cache.createRegionFactory(RegionShortcut.valueOf(regionType)) + .create(regionName); + RegionConfiguration regionConfig = new RegionConfiguration(); + regionConfig.setRegionName(regionName); + regionConfig.setRegionAttributesId(regionType); + FunctionService.onMembers(_cache.getDistributedSystem()) + .withArgs(regionConfig).execute(CreateRegionFunction.ID).getResult(); + } + return r; + } + + /** + * returns the type of region to create by consulting the properties specified + * in hibernate.cfg.xml + * + * @see #retrieveOrCreateRegion(String) + * @param regionName + * @return string representation of {@link RegionShortcut} + */ + private String getRegionType(String regionName) { + String rType = regionAttributes + .getProperty("gemfire.default-region-attributes-id"); + if (rType == null) { + rType = DEFAULT_REGION_TYPE; + } + // iterate to find overridden property for a region + Iterator<Object> it = regionAttributes.keySet().iterator(); + while (it.hasNext()) { + String current = (String)it.next(); + if (current.contains(regionName)) { + rType = regionAttributes.getProperty(current); + break; + } + } + return rType.toUpperCase(); + } + + /** + * Callback to perform any necessary initialization of the underlying cache + * implementation during SessionFactory construction. + * + * @param properties + * current configuration settings. + */ + public void start(Properties properties) throws CacheException { + logger.info("GemFireCacheProvider: Creating cache provider"); + + // We have to strip out any unknown properties, do so here + Properties gemfireOnlyProperties = new Properties(); + for (Object keyObj : properties.keySet()) { + String key = (String)keyObj; + if (key.contains("region-attributes")) { + regionAttributes.put(key, properties.get(key)); + } + else if (key.startsWith("gemfire.")) { + gemfireOnlyProperties.setProperty(key.replace("gemfire.", ""), + properties.getProperty(key)); + } + } + + // Create cache and d-lock service + try { + _cache = new CacheFactory(gemfireOnlyProperties).create(); + DistributedLockService existing = DistributedLockService.getServiceNamed(HIBERNATE_DLOCK_SERVICE_NAME); + if (existing == null) { + this.distributedLockService = DistributedLockService.create( + HIBERNATE_DLOCK_SERVICE_NAME, _cache.getDistributedSystem()); + } else { + this.distributedLockService = existing; + } + } + catch (com.gemstone.gemfire.cache.CacheException e) { + throw new CacheException(e); + } + + FunctionService.registerFunction(new CreateRegionFunction()); + + logger.info("GemFireCacheProvider: Done creating cache provider"); + } + + /** + * Callback to perform any necessary cleanup of the underlying cache + * implementation during SessionFactory.close(). + */ + public void stop() { + logger.info("GemFireCacheProvider: Stopping"); + _cache.close(); + logger.info("GemFireCacheProvider: Stopped"); + } + + public static Logger getLogger() { + return logger; + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java index 35a79ee..c019436 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireQueryCacheFactory.java @@ -1,30 +1,39 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.gemstone.gemfire.modules.hibernate; + +import java.util.Properties; + +import org.hibernate.HibernateException; +import org.hibernate.cache.QueryCache; +import org.hibernate.cache.QueryCacheFactory; +import org.hibernate.cache.UpdateTimestampsCache; +import org.hibernate.cfg.Settings; + +/** + * Defines a factory for query cache instances. These factories are responsible + * for creating individual QueryCache instances. + * */ -package com.gemstone.gemfire.modules.hibernate; - -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.cache.QueryCache; -import org.hibernate.cache.QueryCacheFactory; -import org.hibernate.cache.UpdateTimestampsCache; -import org.hibernate.cfg.Settings; - -/** - * Defines a factory for query cache instances. These factories are responsible - * for creating individual QueryCache instances. - * - */ -public class GemFireQueryCacheFactory implements QueryCacheFactory { - public QueryCache getQueryCache(String regionName, - UpdateTimestampsCache updateTimestampsCache, Settings settings, - Properties props) throws HibernateException { - return new org.hibernate.cache.StandardQueryCache(settings, props, - updateTimestampsCache, regionName); - } -} +public class GemFireQueryCacheFactory implements QueryCacheFactory { + public QueryCache getQueryCache(String regionName, + UpdateTimestampsCache updateTimestampsCache, Settings settings, + Properties props) throws HibernateException { + return new org.hibernate.cache.StandardQueryCache(settings, props, + updateTimestampsCache, regionName); + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java index f2d1696..97e5fdf 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate; import java.util.HashSet; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java index 55abb6a..86c6786 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/Access.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import com.gemstone.gemfire.cache.CacheWriterException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java index c2fa3ba..980e6ab 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.util.ArrayList; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java index c48a042..f1898d8 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/CollectionAccess.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.io.Serializable; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java index bebe4cc..5a4e5e1 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityRegionWriter.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java index d805852..abfb675 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersion.java @@ -1,3 +1,19 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import org.hibernate.cache.access.SoftLock; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java index 7a04e3f..ad160e4 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityVersionImpl.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; /** http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java index 9535f7e..ab92dea 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/EntityWrapper.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.io.DataInput; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java index 63db2d6..9e77a98 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireBaseRegion.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.util.Collection; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java index b6a6bc4..620a332 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireCollectionRegion.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import org.hibernate.cache.CacheDataDescription; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java index a6dbc7a..22ac466 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireEntityRegion.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.util.ArrayList; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java index 1a82a77..ce06b85 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/GemFireQueryResultsRegion.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.util.Collections; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java index 48762ab..c321076 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/KeyWrapper.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.io.DataInput; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java index 2b45fe8..ad617e4 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/NonStrictReadWriteAccess.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import org.hibernate.cache.CacheException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java index f966d12..6f54067 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadOnlyAccess.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import org.hibernate.cache.CacheException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java index 813525b..3c80174 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ReadWriteAccess.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import org.hibernate.cache.CacheException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java index 90df4bc..76fdf77 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java @@ -1,10 +1,19 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ package com.gemstone.gemfire.modules.hibernate.internal; import java.util.Iterator; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java index 3c20717..f12eab9 100644 --- a/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java +++ b/extensions/gemfire-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/TransactionalAccess.java @@ -1,10 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.gemstone.gemfire.modules.hibernate.internal; public class TransactionalAccess extends Access { public TransactionalAccess(GemFireEntityRegion region) { super(region); - // TODO Auto-generated constructor stub } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.hbm.xml ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.hbm.xml b/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.hbm.xml deleted file mode 100644 index 9e9fbd7..0000000 --- a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.hbm.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE hibernate-mapping PUBLIC - "-//Hibernate/Hibernate Mapping DTD 3.0//EN" - "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> - -<hibernate-mapping package="hibe"> - <class name="Event" table="EVENTS"> - <cache usage="read-write"/> - <id name="id" column="EVENT_ID"> - <generator class="native"/> - </id> - <version name="version"/> - <property name="date" type="timestamp" column="EVENT_DATE"/> - <property name="title"/> - </class> -</hibernate-mapping> http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.java b/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.java deleted file mode 100644 index dfc8748..0000000 --- a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/Event.java +++ /dev/null @@ -1,58 +0,0 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ -package hibe; - -import java.util.Date; - -public class Event { - private Long id; - - private String title; - private Date date; - private int i; - - public Event() {} - - public Long getId() { - return id; - } - - private void setId(Long id) { - this.id = id; - } - - public Date getDate() { - return date; - } - - public Integer getVersion() { - return i; - } - - public void setVersion(int i) { - this.i = i; - } - - public void setDate(Date date) { - this.date = date; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - @Override - public String toString() { - StringBuilder b = new StringBuilder(); - b.append("Event:id:"+id+" title:"+title+" date:"+date); - return b.toString(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ed3be77d/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/HibernateBB.java ---------------------------------------------------------------------- diff --git a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/HibernateBB.java b/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/HibernateBB.java deleted file mode 100644 index 9c9a624..0000000 --- a/extensions/gemfire-modules-hibernate/src/test/hydra/hibe/HibernateBB.java +++ /dev/null @@ -1,63 +0,0 @@ -/*========================================================================= - * Copyright (c) 2002-2014, Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ -package hibe; - -import hydra.*; -import hydra.blackboard.Blackboard; - -/** - * A Hydra blackboard that keeps track of what the various task - * threads in an {@link HibernateTest} do. - * - * @author lhughes - * @since 6.5 - */ -public class HibernateBB extends Blackboard { - -// Blackboard creation variables -static String HIBERNATE_BB_NAME = "Hibernate_Blackboard"; -static String HIBERNATE_BB_TYPE = "RMI"; - -// number of invocations for each task type -// just to show counters definition + use -public static int STARTTASK; -public static int INITTASK; -public static int TASK; -public static int CLOSETASK; -public static int ENDTASK; - -// singleton instance of this Blackboard -public static HibernateBB bbInstance = null; - - /** - * Get the HibernateBB - */ - public static HibernateBB getBB() { - if (bbInstance == null) { - synchronized ( HibernateBB.class ) { - if (bbInstance == null) - bbInstance = new HibernateBB(HIBERNATE_BB_NAME, HIBERNATE_BB_TYPE); - } - } - return bbInstance; - } - - /** - * Zero-arg constructor for remote method invocations. - */ - public HibernateBB() { - } - - /** - * Creates a sample blackboard using the specified name and transport type. - */ - public HibernateBB(String name, String type) { - super(name, type, HibernateBB.class); - } - -}
