HHH-7947 remove not maintained 2LC from doc
This commit is contained in:
parent
ae3555221c
commit
2a68f8bef0
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -22,14 +23,17 @@ public class EntityRegionImpl extends BaseTransactionalDataRegion implements Ent
|
|||
super( cache, name, metadata, factory );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
||||
switch ( accessType ) {
|
||||
case READ_ONLY:
|
||||
return new ReadOnlyAccess( this );
|
||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
||||
case TRANSACTIONAL:
|
||||
return new TransactionalAccess( this );
|
||||
}
|
||||
default:
|
||||
throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" );
|
||||
}
|
||||
}
|
||||
|
||||
public PutFromLoadValidator getPutFromLoadValidator() {
|
||||
return new PutFromLoadValidator( cache );
|
||||
|
|
|
@ -23,6 +23,7 @@ public abstract class BaseTransactionalDataRegion
|
|||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheDataDescription getCacheDataDescription() {
|
||||
return metadata;
|
||||
}
|
||||
|
|
|
@ -26,13 +26,15 @@ public class NaturalIdRegionImpl extends BaseTransactionalDataRegion
|
|||
|
||||
@Override
|
||||
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
|
||||
if (AccessType.READ_ONLY.equals(accessType)) {
|
||||
switch ( accessType ){
|
||||
case READ_ONLY:
|
||||
return new ReadOnlyAccess( this );
|
||||
} else if (AccessType.TRANSACTIONAL.equals(accessType)) {
|
||||
case TRANSACTIONAL:
|
||||
return new TransactionalAccess( this );
|
||||
}
|
||||
default:
|
||||
throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" );
|
||||
}
|
||||
}
|
||||
|
||||
public PutFromLoadValidator getPutFromLoadValidator() {
|
||||
return new PutFromLoadValidator(cache);
|
||||
|
|
|
@ -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