List of usage examples for org.hibernate.cache.cfg.spi CollectionDataCachingConfig getOwnerVersionComparator
Comparator getOwnerVersionComparator();
From source file:org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl.java
License:LGPL
@Override public CollectionDataAccess getCollectionDataAccess(NavigableRole collectionRole) { CollectionDataCachingConfig collectionConfig = findConfig(this.config.getCollectionCaching(), collectionRole);//w w w. j a v a2 s . c o m AccessType accessType = collectionConfig.getAccessType(); AccessDelegate accessDelegate = createAccessDelegate(accessType, collectionConfig.getOwnerVersionComparator()); return new CollectionDataAccessImpl(this, accessDelegate, accessType); }
From source file:org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl.java
License:LGPL
private void prepareForVersionedEntries(CacheMode cacheMode) { if (strategy != null) { assert strategy == Strategy.VERSIONED_ENTRIES; return;/* w ww. j ava2 s . co m*/ } prepareCommon(cacheMode); filter = VersionedEntry.EXCLUDE_EMPTY_VERSIONED_ENTRY; for (EntityDataCachingConfig entityConfig : config.getEntityCaching()) { if (entityConfig.isVersioned()) { for (NavigableRole role : entityConfig.getCachedTypes()) { comparatorsByType.put(role.getNavigableName(), entityConfig.getVersionComparatorAccess().get()); } } } for (CollectionDataCachingConfig collectionConfig : config.getCollectionCaching()) { if (collectionConfig.isVersioned()) { comparatorsByType.put(collectionConfig.getNavigableRole().getNavigableName(), collectionConfig.getOwnerVersionComparator()); } } strategy = Strategy.VERSIONED_ENTRIES; }