/** * Get {@code UpdateTimestampsCache} instance managed by the {@code SessionFactory}. * * @deprecated Use {@link #getTimestampsCache} instead */ @Deprecated default UpdateTimestampsCache getUpdateTimestampsCache() { return getTimestampsCache(); }
public void afterTransactionCompletion(boolean success) { while ( !processes.isEmpty() ) { try { processes.poll().doAfterTransactionCompletion( success, session ); } catch (CacheException ce) { LOG.unableToReleaseCacheLock( ce ); // continue loop } catch (Exception e) { throw new AssertionFailure( "Exception releasing cache locks", e ); } } if ( session.getFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) { session.getFactory().getCache().getTimestampsCache().invalidate( querySpacesToInvalidate.toArray( new String[querySpacesToInvalidate.size()] ), session ); } querySpacesToInvalidate.clear(); } }
/** * This method is now called once per execution of an ExecutableList or once for execution of an Execution. * * @param spaces The spaces to invalidate */ private void invalidateSpaces(String... spaces) { if ( spaces != null && spaces.length > 0 ) { for ( Serializable s : spaces ) { if( afterTransactionProcesses == null ) { afterTransactionProcesses = new AfterTransactionCompletionProcessQueue( session ); } afterTransactionProcesses.addSpaceToInvalidate( (String) s ); } // Performance win: If we are processing an ExecutableList, this will only be called once session.getFactory().getCache().getTimestampsCache().preInvalidate( spaces, session ); } }
/** * Get {@code UpdateTimestampsCache} instance managed by the {@code SessionFactory}. * * @deprecated Use {@link #getTimestampsCache} instead */ @Deprecated default UpdateTimestampsCache getUpdateTimestampsCache() { return getTimestampsCache(); }
public void afterTransactionCompletion(boolean success) { while ( !processes.isEmpty() ) { try { processes.poll().doAfterTransactionCompletion( success, session ); } catch (CacheException ce) { LOG.unableToReleaseCacheLock( ce ); // continue loop } catch (Exception e) { throw new AssertionFailure( "Exception releasing cache locks", e ); } } if ( session.getFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) { session.getFactory().getCache().getTimestampsCache().invalidate( querySpacesToInvalidate.toArray( new String[querySpacesToInvalidate.size()] ), session ); } querySpacesToInvalidate.clear(); } }
/** * This method is now called once per execution of an ExecutableList or once for execution of an Execution. * * @param spaces The spaces to invalidate */ private void invalidateSpaces(String... spaces) { if ( spaces != null && spaces.length > 0 ) { for ( Serializable s : spaces ) { if( afterTransactionProcesses == null ) { afterTransactionProcesses = new AfterTransactionCompletionProcessQueue( session ); } afterTransactionProcesses.addSpaceToInvalidate( (String) s ); } // Performance win: If we are processing an ExecutableList, this will only be called once session.getFactory().getCache().getTimestampsCache().preInvalidate( spaces, session ); } }