public DistributedSegmentReadLocker(Cache<Object, Integer> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, int affinitySegmentId, boolean forceSynchronousDeletes) { this.affinitySegmentId = affinitySegmentId; this.forceSynchronousDeletes = forceSynchronousDeletes; if (locksCache == null) throw new IllegalArgumentException("locksCache must not be null"); if (chunksCache == null) throw new IllegalArgumentException("chunksCache must not be null"); if (metadataCache == null) throw new IllegalArgumentException("metadataCache must not be null"); if (indexName == null) throw new IllegalArgumentException("index name must not be null"); this.indexName = indexName; this.locksCache = locksCache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD, Flag.SKIP_INDEXING); this.chunksCache = chunksCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); this.metadataCache = (AdvancedCache<FileCacheKey, FileMetadata>) metadataCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); verifyCacheHasNoEviction(this.locksCache); }
public DistributedSegmentReadLocker(Cache<Object, Integer> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName) { if (locksCache == null) throw new IllegalArgumentException("locksCache must not be null"); if (chunksCache == null) throw new IllegalArgumentException("chunksCache must not be null"); if (metadataCache == null) throw new IllegalArgumentException("metadataCache must not be null"); if (indexName == null) throw new IllegalArgumentException("index name must not be null"); this.indexName = indexName; this.locksCache = locksCache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD, Flag.SKIP_INDEXING); this.chunksCache = chunksCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); this.metadataCache = metadataCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); verifyCacheHasNoEviction(this.locksCache); }
public DistributedSegmentReadLocker(Cache<Object, Integer> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, int affinitySegmentId, boolean forceSynchronousDeletes) { this.affinitySegmentId = affinitySegmentId; this.forceSynchronousDeletes = forceSynchronousDeletes; if (locksCache == null) throw new IllegalArgumentException("locksCache must not be null"); if (chunksCache == null) throw new IllegalArgumentException("chunksCache must not be null"); if (metadataCache == null) throw new IllegalArgumentException("metadataCache must not be null"); if (indexName == null) throw new IllegalArgumentException("index name must not be null"); this.indexName = indexName; this.locksCache = locksCache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD, Flag.SKIP_INDEXING); this.chunksCache = chunksCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); this.metadataCache = (AdvancedCache<FileCacheKey, FileMetadata>) metadataCache.getAdvancedCache().withFlags(Flag.SKIP_INDEXING); verifyCacheHasNoEviction(this.locksCache); }