Tabnine Logo
EntityRegionAccessStrategy.afterUpdate
Code IndexAdd Tabnine to your IDE (free)

How to use
afterUpdate
method
in
org.hibernate.cache.spi.access.EntityRegionAccessStrategy

Best Java code snippets using org.hibernate.cache.spi.access.EntityRegionAccessStrategy.afterUpdate (Showing top 3 results out of 315)

origin: org.infinispan/infinispan-hibernate-cache-v51

@Override
public boolean afterUpdate(Object session, Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock) throws CacheException {
  return unwrapEntity().afterUpdate(unwrap(session), key, value, currentVersion, previousVersion, lock);
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws CacheException {
  EntityPersister persister = getPersister();
  if ( persister.hasCache() ) {
    
    final CacheKey ck = getSession().generateCacheKey(
        getId(), 
        persister.getIdentifierType(), 
        persister.getRootEntityName()
      );
    
    if ( success && cacheEntry!=null /*!persister.isCacheInvalidationRequired()*/ ) {
      boolean put = persister.getCacheAccessStrategy().afterUpdate( ck, cacheEntry, nextVersion, previousVersion, lock );
      
      if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
        getSession().getFactory().getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );
      }
    }
    else {
      persister.getCacheAccessStrategy().unlockItem( ck, lock );
    }
  }
  postCommitUpdate();
}
origin: org.hibernate/com.springsource.org.hibernate

@Override
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws CacheException {
  EntityPersister persister = getPersister();
  if ( persister.hasCache() ) {
    
    final CacheKey ck = getSession().generateCacheKey(
        getId(), 
        persister.getIdentifierType(), 
        persister.getRootEntityName()
      );
    
    if ( success && cacheEntry!=null /*!persister.isCacheInvalidationRequired()*/ ) {
      boolean put = persister.getCacheAccessStrategy().afterUpdate( ck, cacheEntry, nextVersion, previousVersion, lock );
      
      if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
        getSession().getFactory().getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );
      }
    }
    else {
      persister.getCacheAccessStrategy().unlockItem( ck, lock );
    }
  }
  postCommitUpdate();
}
org.hibernate.cache.spi.accessEntityRegionAccessStrategyafterUpdate

Javadoc

Called after an item has been updated (after the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.

Popular methods of EntityRegionAccessStrategy

  • getRegion
    Get the wrapped entity cache region
  • afterInsert
  • insert
  • update
  • evict
  • evictAll
  • get
  • lockItem
  • lockRegion
  • putFromLoad
  • remove
  • removeAll
  • remove,
  • removeAll,
  • unlockItem,
  • unlockRegion

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now