HHH-7947 remove not maintained 2LC from doc
This commit is contained in:
parent
fcfecb82b7
commit
c1cf5cd6e6
|
@ -383,42 +383,12 @@
|
||||||
<listitem><para>read-only</para></listitem>
|
<listitem><para>read-only</para></listitem>
|
||||||
<listitem><para>nontrict read-write</para></listitem>
|
<listitem><para>nontrict read-write</para></listitem>
|
||||||
<listitem><para>read-write</para></listitem>
|
<listitem><para>read-write</para></listitem>
|
||||||
</itemizedlist>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>OSCache</entry>
|
|
||||||
<entry></entry>
|
|
||||||
<entry>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>read-only</para></listitem>
|
|
||||||
<listitem><para>nontrict read-write</para></listitem>
|
|
||||||
<listitem><para>read-write</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>SwarmCache</entry>
|
|
||||||
<entry></entry>
|
|
||||||
<entry>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>read-only</para></listitem>
|
|
||||||
<listitem><para>nontrict read-write</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>JBoss Cache 1.x</entry>
|
|
||||||
<entry></entry>
|
|
||||||
<entry>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>read-only</para></listitem>
|
|
||||||
<listitem><para>transactional</para></listitem>
|
<listitem><para>transactional</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>JBoss Cache 2.x</entry>
|
<entry>Infinispan</entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>
|
<entry>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
|
@ -226,7 +226,7 @@ session.close();]]></programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In keeping with the EJB3 specification, HQL <literal>UPDATE</literal> statements, by default, do not effect the
|
In keeping with the EJB3 specification, HQL <literal>UPDATE</literal> statements, by default, do not effect the
|
||||||
<xref linkend="mapping-declaration-version">version</xref>
|
<xref linkend="entity-mapping-entity-version">version</xref>
|
||||||
or the <xref linkend="mapping-declaration-timestamp">timestamp</xref> property values
|
or the <xref linkend="mapping-declaration-timestamp">timestamp</xref> property values
|
||||||
for the affected entities. However,
|
for the affected entities. However,
|
||||||
you can force Hibernate to reset the <literal>version</literal> or
|
you can force Hibernate to reset the <literal>version</literal> or
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class PutFromLoadValidator {
|
||||||
// or regionRemoved has been called. Check if we can proceed
|
// or regionRemoved has been called. Check if we can proceed
|
||||||
if (now > invalidationTimestamp) {
|
if (now > invalidationTimestamp) {
|
||||||
Long removedTime = recentRemovals.get(key);
|
Long removedTime = recentRemovals.get(key);
|
||||||
if (removedTime == null || now > removedTime.longValue()) {
|
if (removedTime == null || now > removedTime ) {
|
||||||
// It's legal to proceed. But we have to record this key
|
// It's legal to proceed. But we have to record this key
|
||||||
// in pendingPuts so releasePutFromLoadLock can find it.
|
// in pendingPuts so releasePutFromLoadLock can find it.
|
||||||
// To do this we basically simulate a normal "register
|
// To do this we basically simulate a normal "register
|
||||||
|
@ -280,7 +280,7 @@ public class PutFromLoadValidator {
|
||||||
|
|
||||||
// Don't let recentRemovals map become a memory leak
|
// Don't let recentRemovals map become a memory leak
|
||||||
RecentRemoval toClean = null;
|
RecentRemoval toClean = null;
|
||||||
boolean attemptClean = removal.timestamp.longValue() > earliestRemovalTimestamp;
|
boolean attemptClean = removal.timestamp > earliestRemovalTimestamp;
|
||||||
removalsLock.lock();
|
removalsLock.lock();
|
||||||
try {
|
try {
|
||||||
removalsQueue.add(removal);
|
removalsQueue.add(removal);
|
||||||
|
@ -290,7 +290,7 @@ public class PutFromLoadValidator {
|
||||||
// just added it
|
// just added it
|
||||||
toClean = removalsQueue.remove(0);
|
toClean = removalsQueue.remove(0);
|
||||||
}
|
}
|
||||||
earliestRemovalTimestamp = removalsQueue.get(0).timestamp.longValue();
|
earliestRemovalTimestamp = removalsQueue.get( 0 ).timestamp;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
removalsLock.unlock();
|
removalsLock.unlock();
|
||||||
|
@ -526,7 +526,7 @@ public class PutFromLoadValidator {
|
||||||
|
|
||||||
private RecentRemoval(Object key, long nakedPutInvalidationPeriod) {
|
private RecentRemoval(Object key, long nakedPutInvalidationPeriod) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
timestamp = Long.valueOf(System.currentTimeMillis() + nakedPutInvalidationPeriod);
|
timestamp = System.currentTimeMillis() + nakedPutInvalidationPeriod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.hibernate.cache.spi.EntityRegion;
|
||||||
import org.hibernate.cache.spi.RegionFactory;
|
import org.hibernate.cache.spi.RegionFactory;
|
||||||
import org.hibernate.cache.spi.access.AccessType;
|
import org.hibernate.cache.spi.access.AccessType;
|
||||||
import org.hibernate.cache.spi.access.EntityRegionAccessStrategy;
|
import org.hibernate.cache.spi.access.EntityRegionAccessStrategy;
|
||||||
|
|
||||||
import org.infinispan.AdvancedCache;
|
import org.infinispan.AdvancedCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,22 +18,25 @@ import org.infinispan.AdvancedCache;
|
||||||
*/
|
*/
|
||||||
public class EntityRegionImpl extends BaseTransactionalDataRegion implements EntityRegion {
|
public class EntityRegionImpl extends BaseTransactionalDataRegion implements EntityRegion {
|
||||||
|
|
||||||
public EntityRegionImpl(AdvancedCache cache, String name,
|
public EntityRegionImpl(AdvancedCache cache, String name,
|
||||||
CacheDataDescription metadata, RegionFactory factory) {
|
CacheDataDescription metadata, RegionFactory factory) {
|
||||||
super(cache, name, metadata, factory);
|
super( cache, name, metadata, factory );
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
@Override
|
||||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||||
return new ReadOnlyAccess(this);
|
switch ( accessType ) {
|
||||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
case READ_ONLY:
|
||||||
return new TransactionalAccess(this);
|
return new ReadOnlyAccess( this );
|
||||||
}
|
case TRANSACTIONAL:
|
||||||
throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
|
return new TransactionalAccess( this );
|
||||||
}
|
default:
|
||||||
|
throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public PutFromLoadValidator getPutFromLoadValidator() {
|
public PutFromLoadValidator getPutFromLoadValidator() {
|
||||||
return new PutFromLoadValidator(cache);
|
return new PutFromLoadValidator( cache );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@ public abstract class BaseTransactionalDataRegion
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public CacheDataDescription getCacheDataDescription() {
|
public CacheDataDescription getCacheDataDescription() {
|
||||||
return metadata;
|
return metadata;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,14 @@ public class NaturalIdRegionImpl extends BaseTransactionalDataRegion
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
switch ( accessType ){
|
||||||
return new ReadOnlyAccess(this);
|
case READ_ONLY:
|
||||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
return new ReadOnlyAccess( this );
|
||||||
return new TransactionalAccess(this);
|
case TRANSACTIONAL:
|
||||||
|
return new TransactionalAccess( this );
|
||||||
|
default:
|
||||||
|
throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" );
|
||||||
}
|
}
|
||||||
throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PutFromLoadValidator getPutFromLoadValidator() {
|
public PutFromLoadValidator getPutFromLoadValidator() {
|
||||||
|
|
|
@ -10,7 +10,6 @@ import org.hibernate.cache.spi.access.SoftLock;
|
||||||
* @author Strong Liu <stliu@hibernate.org>
|
* @author Strong Liu <stliu@hibernate.org>
|
||||||
*/
|
*/
|
||||||
class ReadOnlyAccess extends TransactionalAccess {
|
class ReadOnlyAccess extends TransactionalAccess {
|
||||||
private static final Log log = LogFactory.getLog( ReadOnlyAccess.class );
|
|
||||||
|
|
||||||
ReadOnlyAccess(NaturalIdRegionImpl naturalIdRegion) {
|
ReadOnlyAccess(NaturalIdRegionImpl naturalIdRegion) {
|
||||||
super( naturalIdRegion );
|
super( naturalIdRegion );
|
||||||
|
|
|
@ -37,14 +37,9 @@ public class HibernateTransactionManagerLookup implements org.infinispan.transac
|
||||||
private final JtaPlatform jtaPlatform;
|
private final JtaPlatform jtaPlatform;
|
||||||
|
|
||||||
public HibernateTransactionManagerLookup(Settings settings, Properties properties) {
|
public HibernateTransactionManagerLookup(Settings settings, Properties properties) {
|
||||||
if ( settings != null ) {
|
this.jtaPlatform = settings != null ? settings.getJtaPlatform() : null;
|
||||||
jtaPlatform = settings.getJtaPlatform();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
jtaPlatform = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public TransactionManager getTransactionManager() throws Exception {
|
public TransactionManager getTransactionManager() throws Exception {
|
||||||
return jtaPlatform == null ? null : jtaPlatform.retrieveTransactionManager();
|
return jtaPlatform == null ? null : jtaPlatform.retrieveTransactionManager();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue