cleanup; source headers

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14231 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2007-12-07 21:40:51 +00:00
parent dd9310207b
commit 783cc27c31
32 changed files with 687 additions and 387 deletions

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
@ -44,7 +52,6 @@ import org.hibernate.cache.jbc2.util.NonLockingDataVersion;
* General support for writing {@link Region} implementations for JBoss Cache
* 2.x.
*
*
* @author Steve Ebersole
*/
@CacheListener
@ -81,7 +88,7 @@ public abstract class BasicRegionAdapter implements Region {
classLoader = getClass().getClassLoader();
}
jbcRegion.registerContextClassLoader(classLoader);
if (jbcRegion.isActive() == false) {
if ( !jbcRegion.isActive() ) {
jbcRegion.activate();
}
}
@ -105,7 +112,7 @@ public abstract class BasicRegionAdapter implements Region {
}
else if (optimistic && regionRoot instanceof NodeSPI) {
// FIXME Hacky workaround to JBCACHE-1202
if ((((NodeSPI) regionRoot).getVersion() instanceof NonLockingDataVersion) == false) {
if ( !( ( ( NodeSPI ) regionRoot ).getVersion() instanceof NonLockingDataVersion ) ) {
((NodeSPI) regionRoot).setVersion(NonLockingDataVersion.INSTANCE);
}
}
@ -211,10 +218,11 @@ public abstract class BasicRegionAdapter implements Region {
* {@link #suspend suspending any ongoing transaction}. Wraps any exception
* in a {@link CacheException}. Ensures any ongoing transaction is resumed.
*
* @param key
* @param key The key of the item to get
* @param opt any option to add to the get invocation. May be <code>null</code>
* @param suppressTimeout should any TimeoutException be suppressed?
* @return
* @return The retrieved object
* @throws CacheException issue managing transaction or talking to cache
*/
protected Object suspendAndGet(Object key, Option opt, boolean suppressTimeout) throws CacheException {
Transaction tx = suspend();

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
@ -35,8 +43,6 @@ import org.hibernate.cfg.Settings;
import org.hibernate.util.PropertiesHelper;
import org.jboss.cache.DefaultCacheFactory;
;
/**
* {@link RegionFactory} that uses one or more JBoss Cache instances for
* caching entities, collections, queries and timestamps. How the factory
@ -66,7 +72,7 @@ public class JBossCacheRegionFactory implements RegionFactory {
* FIXME Per the RegionFactory class Javadoc, this constructor version
* should not be necessary.
*
* @param props
* @param props The configuration properties
*/
public JBossCacheRegionFactory(Properties props) {
this();
@ -82,7 +88,7 @@ public class JBossCacheRegionFactory implements RegionFactory {
* Create a new JBossCacheRegionFactory that uses the provided
* {@link CacheInstanceManager}.
*
* @param cacheInstanceManager
* @param cacheInstanceManager The contract for how we get JBC cache instances.
*/
public JBossCacheRegionFactory(CacheInstanceManager cacheInstanceManager) {
this.cacheInstanceManager = cacheInstanceManager;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
import java.util.Properties;
@ -44,7 +51,7 @@ public class JndiMultiplexedJBossCacheRegionFactory extends JBossCacheRegionFact
* FIXME Per the RegionFactory class Javadoc, this constructor version
* should not be necessary.
*
* @param props
* @param props The configuration properties
*/
public JndiMultiplexedJBossCacheRegionFactory(Properties props) {
this();

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
import java.util.Properties;
@ -40,7 +47,7 @@ public class JndiSharedJBossCacheRegionFactory extends JBossCacheRegionFactory {
* FIXME Per the RegionFactory class Javadoc, this constructor version
* should not be necessary.
*
* @param props
* @param props The configuration properties
*/
public JndiSharedJBossCacheRegionFactory(Properties props) {
this();

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
import java.util.Properties;
@ -44,7 +51,7 @@ public class MultiplexedJBossCacheRegionFactory extends JBossCacheRegionFactory
* FIXME Per the RegionFactory class Javadoc, this constructor version
* should not be necessary.
*
* @param props
* @param props The configuration properties
*/
public MultiplexedJBossCacheRegionFactory(Properties props) {
this();

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;
import java.util.Properties;
@ -43,7 +50,7 @@ public class SharedJBossCacheRegionFactory extends JBossCacheRegionFactory {
* FIXME Per the RegionFactory class Javadoc, this constructor version
* should not be necessary.
*
* @param props
* @param props The configuration properties
*/
public SharedJBossCacheRegionFactory(Properties props) {
this();

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.access;
import org.hibernate.cache.CacheDataDescription;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.access;
@ -45,7 +53,6 @@ public class TransactionalAccessDelegate {
}
public Object get(Object key, long txTimestamp) throws CacheException {
return CacheHelper.get(cache, regionFqn, key);
}

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
import java.util.Set;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
import java.io.ByteArrayInputStream;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
import java.util.Properties;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
import java.util.Properties;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
@ -150,19 +158,23 @@ public class MultiplexingCacheInstanceManager implements CacheInstanceManager {
}
/**
* Create a new MultiplexingCacheInstanceManager using the provided
* {@link Cache}s.
* <p>
* Create a new MultiplexingCacheInstanceManager using the provided {@link Cache}s.
* <p/>
* If this constructor is used, the {@link #start(Settings, Properties)}
* method will make no attempt to create a cache factory or obtain caches
* from it. Only the <code>Cache</code>s passed as arguments to this
* constructor will be available.
* </p>
*
* @param jbcEntityCache The entity cache
* @param jbcCollectionCache the collection cache
* @param jbcTsCache The timestamps cache
* @param jbcQueryCache The query cache
*/
public MultiplexingCacheInstanceManager(Cache jbcEntityCache, Cache jbcCollectionCache,
Cache jbcTsCache, Cache jbcQueryCache) {
public MultiplexingCacheInstanceManager(
Cache jbcEntityCache,
Cache jbcCollectionCache,
Cache jbcTsCache,
Cache jbcQueryCache) {
this.jbcEntityCache = jbcEntityCache;
this.jbcCollectionCache = jbcCollectionCache;
this.jbcTsCache = jbcTsCache;
@ -170,33 +182,42 @@ public class MultiplexingCacheInstanceManager implements CacheInstanceManager {
}
/**
* Gets the cache factory.
*/
public JBossCacheFactory getCacheFactory() {
* Getter for property 'cacheFactory'.
* @see #setCacheFactory
*
* @return Value for property 'cacheFactory'.
*/
public JBossCacheFactory getCacheFactory() {
return jbcFactory;
}
/**
* Sets the cache factory.
* @param cacheFactory the cache factory
*/
public void setCacheFactory(JBossCacheFactory factory) {
* Setter for property 'cacheFactory'.
* @see #getCacheFactory
*
* @param factory Value to set for property 'cacheFactory'.
*/
public void setCacheFactory(JBossCacheFactory factory) {
this.jbcFactory = factory;
}
/**
* Gets the channel factory.
*/
public ChannelFactory getChannelFactory() {
* Getter for property 'channelFactory'.
* @see #setChannelFactory
*
* @return Value for property 'channelFactory'.
*/
public ChannelFactory getChannelFactory() {
return channelFactory;
}
/**
* Set the channel factory.
*
* @param factory the channel factory
*/
public void setChannelFactory(ChannelFactory factory) {
* Setter for property 'channelFactory'.
* @see #getChannelFactory
*
* @param factory Value to set for property 'channelFactory'.
*/
public void setChannelFactory(ChannelFactory factory) {
this.channelFactory = factory;
}

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.builder;
@ -175,9 +183,9 @@ public class SharedCacheInstanceManager implements CacheInstanceManager {
/**
* Create a cache using the given settings and properties.
*
* @param settings
* @param properties
* @return
* @param settings The Hibernate settings
* @param properties The configuration properties
* @return The created cache
*/
protected Cache createSharedCache(Settings settings, Properties properties)
{
@ -189,9 +197,9 @@ public class SharedCacheInstanceManager implements CacheInstanceManager {
* Injects the TransactionManager found via {@link Settings#getTransactionManagerLookup()}
* into the cache.
*
* @param cache
* @param settings
* @param properties
* @param cache The cache instance
* @param settings The Hibernate settings
* @param properties The configuration properties
*
* @throws CacheException if <code>cache</code> is already started and is
* configured with a different TransactionManager

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.collection;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.collection;
import org.hibernate.cache.CacheException;
@ -36,7 +43,7 @@ public class OptimisticReadOnlyAccess extends OptimisticTransactionalAccess {
/**
* Create a new OptimisticReadOnlyAccess.
*
* @param region
* @param region The region to which this is providing access
*/
public OptimisticReadOnlyAccess(CollectionRegionImpl region) {
super(region);

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.collection;
import org.hibernate.cache.jbc2.access.OptimisticTransactionalAccessDelegate;
@ -30,7 +37,7 @@ public class OptimisticTransactionalAccess extends TransactionalAccess {
/**
* Create a new OptimisticTransactionalAccess.
*
* @param region
* @param region The region to which this is providing access
*/
public OptimisticTransactionalAccess(CollectionRegionImpl region) {

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.collection;
@ -32,26 +40,43 @@ import org.hibernate.cache.CacheException;
public class ReadOnlyAccess extends TransactionalAccess {
private static final Logger log = LoggerFactory.getLogger(ReadOnlyAccess.class);
public ReadOnlyAccess(CollectionRegionImpl region) {
/**
* Create a provider of read-only access to the specific region.
*
* @param region The region to which this provides access.
*/
public ReadOnlyAccess(CollectionRegionImpl region) {
super(region);
}
@Override
/**
* {@inheritDoc}
*/
@Override
public SoftLock lockItem(Object key, Object version) throws CacheException {
throw new UnsupportedOperationException("Illegal attempt to edit read only item");
}
@Override
/**
* {@inheritDoc}
*/
@Override
public SoftLock lockRegion() throws CacheException {
throw new UnsupportedOperationException("Illegal attempt to edit read only region");
}
@Override
/**
* {@inheritDoc}
*/
@Override
public void unlockItem(Object key, SoftLock lock) throws CacheException {
log.error("Illegal attempt to edit read only item");
}
@Override
/**
* {@inheritDoc}
*/
@Override
public void unlockRegion(SoftLock lock) throws CacheException {
log.error("Illegal attempt to edit read only region");
}

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.collection;
@ -41,7 +49,7 @@ public class TransactionalAccess implements CollectionRegionAccessStrategy {
/**
* Create a new TransactionalAccess.
*
* @param region
* @param region the region to which this provides access
*/
public TransactionalAccess(CollectionRegionImpl region) {
this(region, new TransactionalAccessDelegate(region.getCacheInstance(), region.getRegionFqn()));
@ -50,65 +58,98 @@ public class TransactionalAccess implements CollectionRegionAccessStrategy {
/**
* Allow subclasses to define the delegate.
*
* @param region
* @param delegate
* @param region the region to which this provides access
* @param delegate type of transactional access
*/
protected TransactionalAccess(CollectionRegionImpl region, TransactionalAccessDelegate delegate) {
this.region = region;
this.delegate = delegate;
}
public CollectionRegion getRegion() {
/**
* {@inheritDoc}
*/
public CollectionRegion getRegion() {
return region;
}
public Object get(Object key, long txTimestamp) throws CacheException {
/**
* {@inheritDoc}
*/
public Object get(Object key, long txTimestamp) throws CacheException {
return delegate.get(key, txTimestamp);
}
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws CacheException {
/**
* {@inheritDoc}
*/
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws CacheException {
return delegate.putFromLoad(key, value, txTimestamp, version);
}
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
/**
* {@inheritDoc}
*/
public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
throws CacheException {
return delegate.putFromLoad(key, value, txTimestamp, version, minimalPutOverride);
}
public void remove(Object key) throws CacheException {
/**
* {@inheritDoc}
*/
public void remove(Object key) throws CacheException {
delegate.remove(key);
}
public void removeAll() throws CacheException {
/**
* {@inheritDoc}
*/
public void removeAll() throws CacheException {
delegate.removeAll();
}
public void evict(Object key) throws CacheException {
/**
* {@inheritDoc}
*/
public void evict(Object key) throws CacheException {
delegate.evict(key);
}
public void evictAll() throws CacheException {
/**
* {@inheritDoc}
*/
public void evictAll() throws CacheException {
delegate.evictAll();
}
// Following methods we don't delegate since they have so little logic
// it's clearer to just implement them here
public SoftLock lockItem(Object key, Object version) throws CacheException {
/**
* {@inheritDoc}
*/
public SoftLock lockItem(Object key, Object version) throws CacheException {
return null;
}
public SoftLock lockRegion() throws CacheException {
/**
* {@inheritDoc}
*/
public SoftLock lockRegion() throws CacheException {
return null;
}
public void unlockItem(Object key, SoftLock lock) throws CacheException {
/**
* {@inheritDoc}
*/
public void unlockItem(Object key, SoftLock lock) throws CacheException {
}
public void unlockRegion(SoftLock lock) throws CacheException {
/**
* {@inheritDoc}
*/
public void unlockRegion(SoftLock lock) throws CacheException {
}
}

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.entity;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.entity;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.entity;
@ -30,7 +38,7 @@ public class OptimisticTransactionalAccess extends TransactionalAccess {
/**
* Create a new OptimisticTransactionalAccess.
*
* @param region
* @param region The region\ to which this is providing access
*/
public OptimisticTransactionalAccess(EntityRegionImpl region) {
super(region, new OptimisticTransactionalAccessDelegate(region.getCacheInstance(), region.getRegionFqn(),

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.entity;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.entity;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.query;
import java.util.Properties;
@ -47,10 +54,10 @@ public class QueryResultsRegionImpl extends TransactionalDataRegionAdapter imple
/**
* Create a new QueryResultsRegionImpl.
*
* @param jbcCache
* @param regionName
* @param regionPrefix
* TODO
* @param jbcCache The JBC cache instance to use to store the query results
* @param regionName The name of the region (within the JBC cache)
* @param regionPrefix Any region prefix to apply
* @param properties The configuration properties.
*/
public QueryResultsRegionImpl(Cache jbcCache, String regionName, String regionPrefix, Properties properties) {
super(jbcCache, regionName, regionPrefix, null);

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.timestamp;
@ -57,12 +65,11 @@ public class TimestampsRegionImpl extends TransactionalDataRegionAdapter impleme
/**
* Create a new TimestampsRegionImpl.
*
* @param jbcCache
* @param regionName
* @param regionPrefix
* TODO
* @param metadata
*
* @param jbcCache The JBC cache instance to use to store the timestamps data
* @param regionName The name of the region (within the JBC cache)
* @param regionPrefix Any region prefix to apply
* @param properties The configuration properties.
*/
public TimestampsRegionImpl(Cache jbcCache, String regionName, String regionPrefix, Properties properties) {
super(jbcCache, regionName, regionPrefix, null);

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Steve Ebersole
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.util;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.util;
import org.hibernate.cache.CacheException;

View File

@ -1,17 +1,25 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.util;

View File

@ -1,19 +1,26 @@
/*
* Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors.  All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, v. 2.1. This program is distributed in the
* hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. You should have received a
* copy of the GNU Lesser General Public License, v.2.1 along with this
* distribution; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* Lesser General Public License, as published by the Free Software Foundation.
*
* Red Hat Author(s): Brian Stansberry
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.cache.jbc2.util;
import org.hibernate.cache.jbc2.entity.TransactionalAccess;
@ -45,7 +52,6 @@ public class NonLockingDataVersion implements DataVersion {
}
public boolean newerThan(DataVersion dataVersion) {
// if (dataVersion instanceof DefaultDataVersion) {
// log.info("unexpectedly validating against a DefaultDataVersion", new Exception("Just a stack trace"));
// return true;