/** * This method call is guarded by imSync lock created for each region. * Set IndexManger for region. */ public IndexManager setIndexManager(IndexManager indexManager) { checkReadiness(); IndexManager oldIdxManager = this.indexManager; this.indexManager = indexManager; return oldIdxManager; }
/** * This method call is guarded by imSync lock created for each region. * Set IndexManger for region. */ public IndexManager setIndexManager(IndexManager indexManager) { checkReadiness(); IndexManager oldIdxManager = this.indexManager; this.indexManager = indexManager; return oldIdxManager; }
@Override public Map getAll(Collection keys, Object callback) { if (keys == null) { throw new NullPointerException("The collection of keys for getAll cannot be null"); } checkReadiness(); checkForLimitedOrNoAccess(); return keys.isEmpty()? new HashMap(): basicGetAll(keys, callback); }
public Map getAll(Collection keys) { if (keys == null) { throw new NullPointerException("The collection of keys for getAll cannot be null"); } checkReadiness(); checkForLimitedOrNoAccess(); return keys.isEmpty()? new HashMap(): basicGetAll(keys); }
public synchronized CacheWriter setCacheWriter(CacheWriter cacheWriter) { checkReadiness(); CacheWriter oldWriter = this.cacheWriter; assignCacheWriter(cacheWriter); cacheWriterChanged(oldWriter); return oldWriter; }
public synchronized CacheLoader setCacheLoader(CacheLoader cl) { checkReadiness(); CacheLoader oldLoader = this.cacheLoader; assignCacheLoader(cl); cacheLoaderChanged(oldLoader); return oldLoader; }
public void becomeLockGrantor() { checkReadiness(); checkForLimitedOrNoAccess(); if (this.scope != Scope.GLOBAL) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_LOCK_GRANTOR_WHEN_SCOPE_IS_NOT_GLOBAL.toLocalizedString()); } if (isCurrentlyLockGrantor()) return; // nothing to do... already lock grantor this.isLockGrantor = true; }
public void becomeLockGrantor() { checkReadiness(); checkForLimitedOrNoAccess(); if (this.scope != Scope.GLOBAL) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_LOCK_GRANTOR_WHEN_SCOPE_IS_NOT_GLOBAL.toLocalizedString()); } if (isCurrentlyLockGrantor()) return; // nothing to do... already lock grantor this.isLockGrantor = true; }
/** ********************* CacheStatistics ******************************** */ public CacheStatistics getStatistics() { // prefer region destroyed exception over statistics disabled exception checkReadiness(); if (!this.statisticsEnabled) { throw new StatisticsDisabledException(LocalizedStrings.AbstractRegion_STATISTICS_DISABLED_FOR_REGION_0.toLocalizedString(getFullPath())); } return this; }
public synchronized CacheLoader setCacheLoader(CacheLoader cl) { checkReadiness(); if (cl != null && isBridgeLoader(cl)) { if (getPoolName() != null) { throw new IllegalStateException("A region with a connection pool can not have a BridgeLoader."); } } CacheLoader oldLoader = this.cacheLoader; assignCacheLoader(cl); cacheLoaderChanged(oldLoader); return oldLoader; }
/** ********************* CacheStatistics ******************************** */ public CacheStatistics getStatistics() { // prefer region destroyed exception over statistics disabled exception checkReadiness(); if (!this.statisticsEnabled) { throw new StatisticsDisabledException(LocalizedStrings.AbstractRegion_STATISTICS_DISABLED_FOR_REGION_0.toLocalizedString(getFullPath())); } return this; }
public synchronized CacheWriter setCacheWriter(CacheWriter cacheWriter) { checkReadiness(); if (cacheWriter != null && isBridgeWriter(cacheWriter)) { if (getPoolName() != null) { throw new IllegalStateException("A region with a connection pool can not have a BridgeWriter."); } } CacheWriter oldWriter = this.cacheWriter; assignCacheWriter(cacheWriter); cacheWriterChanged(oldWriter); return oldWriter; }
public CustomExpiry setCustomEntryIdleTimeout(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryIdleTimeout(); this.customEntryIdleTimeout = custom; updateEntryExpiryPossible(); idleTimeoutChanged(getEntryIdleTimeout()); return old; }
public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_CUSTOM_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryTimeToLive(); this.customEntryTimeToLive = custom; updateEntryExpiryPossible(); timeToLiveChanged(getEntryTimeToLive()); return old; }
public CustomExpiry setCustomEntryIdleTimeout(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryIdleTimeout(); this.customEntryIdleTimeout = custom; updateEntryExpiryPossible(); idleTimeoutChanged(getEntryIdleTimeout()); return old; }
public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_CUSTOM_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryTimeToLive(); this.customEntryTimeToLive = custom; updateEntryExpiryPossible(); timeToLiveChanged(getEntryTimeToLive()); return old; }
public void localClear() { checkReadiness(); checkForNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOCAL_CLEAR, null, false, getMyId(),generateEventID()/* generate EventID */); basicLocalClear(event); }
public void clear() { checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl regionEvent = new RegionEventImpl(this, Operation.REGION_CLEAR, null, false, getMyId(),generateEventID()); basicClear(regionEvent); }
public void localClear() { checkReadiness(); checkForNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOCAL_CLEAR, null, false, getMyId(),generateEventID()/* generate EventID */); basicLocalClear(event); }
public void clear() { checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl regionEvent = new RegionEventImpl(this, Operation.REGION_CLEAR, null, false, getMyId(),generateEventID()); basicClear(regionEvent); }