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>nontrict 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>
|
||||
</itemizedlist>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>JBoss Cache 2.x</entry>
|
||||
<entry>Infinispan</entry>
|
||||
<entry></entry>
|
||||
<entry>
|
||||
<itemizedlist>
|
||||
|
|
|
@ -226,7 +226,7 @@ session.close();]]></programlisting>
|
|||
|
||||
<para>
|
||||
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
|
||||
for the affected entities. However,
|
||||
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
|
||||
if (now > invalidationTimestamp) {
|
||||
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
|
||||
// in pendingPuts so releasePutFromLoadLock can find it.
|
||||
// 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
|
||||
RecentRemoval toClean = null;
|
||||
boolean attemptClean = removal.timestamp.longValue() > earliestRemovalTimestamp;
|
||||
boolean attemptClean = removal.timestamp > earliestRemovalTimestamp;
|
||||
removalsLock.lock();
|
||||
try {
|
||||
removalsQueue.add(removal);
|
||||
|
@ -290,7 +290,7 @@ public class PutFromLoadValidator {
|
|||
// just added it
|
||||
toClean = removalsQueue.remove(0);
|
||||
}
|
||||
earliestRemovalTimestamp = removalsQueue.get(0).timestamp.longValue();
|
||||
earliestRemovalTimestamp = removalsQueue.get( 0 ).timestamp;
|
||||
}
|
||||
} finally {
|
||||
removalsLock.unlock();
|
||||
|
@ -526,7 +526,7 @@ public class PutFromLoadValidator {
|
|||
|
||||
private RecentRemoval(Object key, long nakedPutInvalidationPeriod) {
|
||||
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.access.AccessType;
|
||||
import org.hibernate.cache.spi.access.EntityRegionAccessStrategy;
|
||||
|
||||
import org.infinispan.AdvancedCache;
|
||||
|
||||
/**
|
||||
|
@ -19,20 +20,23 @@ public class EntityRegionImpl extends BaseTransactionalDataRegion implements Ent
|
|||
|
||||
public EntityRegionImpl(AdvancedCache cache, String name,
|
||||
CacheDataDescription metadata, RegionFactory factory) {
|
||||
super(cache, name, metadata, factory);
|
||||
super( cache, name, metadata, factory );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
||||
return new ReadOnlyAccess(this);
|
||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
||||
return new TransactionalAccess(this);
|
||||
switch ( accessType ) {
|
||||
case READ_ONLY:
|
||||
return new ReadOnlyAccess( 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() {
|
||||
return new PutFromLoadValidator(cache);
|
||||
return new PutFromLoadValidator( cache );
|
||||
}
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@ public abstract class BaseTransactionalDataRegion
|
|||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheDataDescription getCacheDataDescription() {
|
||||
return metadata;
|
||||
}
|
||||
|
|
|
@ -26,12 +26,14 @@ public class NaturalIdRegionImpl extends BaseTransactionalDataRegion
|
|||
|
||||
@Override
|
||||
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
||||
return new ReadOnlyAccess(this);
|
||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
||||
return new TransactionalAccess(this);
|
||||
switch ( accessType ){
|
||||
case READ_ONLY:
|
||||
return new ReadOnlyAccess( 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() {
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.hibernate.cache.spi.access.SoftLock;
|
|||
* @author Strong Liu <stliu@hibernate.org>
|
||||
*/
|
||||
class ReadOnlyAccess extends TransactionalAccess {
|
||||
private static final Log log = LogFactory.getLog( ReadOnlyAccess.class );
|
||||
|
||||
ReadOnlyAccess(NaturalIdRegionImpl naturalIdRegion) {
|
||||
super( naturalIdRegion );
|
||||
|
|
|
@ -37,14 +37,9 @@ public class HibernateTransactionManagerLookup implements org.infinispan.transac
|
|||
private final JtaPlatform jtaPlatform;
|
||||
|
||||
public HibernateTransactionManagerLookup(Settings settings, Properties properties) {
|
||||
if ( settings != null ) {
|
||||
jtaPlatform = settings.getJtaPlatform();
|
||||
this.jtaPlatform = settings != null ? settings.getJtaPlatform() : null;
|
||||
}
|
||||
else {
|
||||
jtaPlatform = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransactionManager getTransactionManager() throws Exception {
|
||||
return jtaPlatform == null ? null : jtaPlatform.retrieveTransactionManager();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue