@Override public boolean getEnableLocalCache() { // This property will be null if it hasn't been set in the context.xml file. // Since its default is dependent on the session cache, get the default from // the session cache. if (this.enableLocalCache == null) { this.enableLocalCache = getSessionCache().getDefaultEnableLocalCache(); } return this.enableLocalCache; }
@Override public String getRegionAttributesId() { // This property will be null if it hasn't been set in the context.xml file. // Since its default is dependent on the session cache, get the default from // the session cache. if (this.regionAttributesId == null) { this.regionAttributesId = getSessionCache().getDefaultRegionAttributesId(); } return this.regionAttributesId; }
@Override public void add(Session session) { // super.add(session); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Storing session " + session.getId() + " into " + getSessionCache().getOperatingRegionName()); } getSessionCache().putSession(session); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Stored session " + session.getId() + " into " + getSessionCache().getOperatingRegionName()); } getSessionCache().getStatistics().incSessionsCreated(); }
QueryService querySvc = sessionCache.getCache().getQueryService(); Context context = getTheContext(); if (context == null) { if (getSessionCache().isClientServer()) { for (DeltaSessionInterface session : list) { if (getLogger().isDebugEnabled()) { getLogger().debug("Locally destroying session " + session.getId()); getSessionCache().getOperatingRegion().localDestroy(session.getId());
public void remove(Session session, boolean update) { // super.remove(session); // Remove the session from the region if necessary. // It will have already been removed if it expired implicitly. DeltaSessionInterface ds = (DeltaSessionInterface) session; if (ds.getExpired()) { if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Expired session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } } else { if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Destroying session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } getSessionCache().destroySession(session.getId()); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Destroyed session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } } }
this + ": Finding session " + id + " in " + getSessionCache().getOperatingRegionName()); DeltaSessionInterface session = (DeltaSessionInterface) getSessionCache().getSession(id); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Did not find session " + id + " in " + getSessionCache().getOperatingRegionName()); + getSessionCache().getOperatingRegionName() + ": " + session);
private void initializeRegion(DeltaSessionManager sessionManager) { // Get the session region name this.sessionRegionName = sessionManager.getRegionName(); // Get the operating region. // If a P2P manager is used, then this will be a local region fronting the // session region if local cache is enabled; otherwise, it will be the // session region itself. // If a CS manager is used, it will be the session proxy region. this.operatingRegion = sessionManager.getSessionCache().getOperatingRegion(); if (sessionManager.getLogger().isDebugEnabled()) { sessionManager.getLogger().debug(this + ": Set operating region: " + this.operatingRegion); } }
@Override public boolean isBackingCacheAvailable() { return sessionCache.isBackingCacheAvailable(); }
protected void initializeSessionCache() { // Retrieve the cache GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance(); if (cache == null) { throw new IllegalStateException( "No cache exists. Please configure either a PeerToPeerCacheLifecycleListener or ClientServerCacheLifecycleListener in the server.xml file."); } // Create the appropriate session cache this.sessionCache = cache.isClient() ? new ClientServerSessionCache(this, cache) : new PeerToPeerSessionCache(this, cache); // Initialize the session cache this.sessionCache.initialize(); }
public DeltaSessionStatistics getStatistics() { return getSessionCache().getStatistics(); }
QueryService querySvc = sessionCache.getCache().getQueryService(); Context context = getTheContext(); if (context == null) { if (getSessionCache().isClientServer()) { for (DeltaSessionInterface session : list) { if (getLogger().isDebugEnabled()) { getLogger().debug("Locally destroying session " + session.getId()); getSessionCache().getOperatingRegion().localDestroy(session.getId());
public void remove(Session session, boolean update) { // super.remove(session); // Remove the session from the region if necessary. // It will have already been removed if it expired implicitly. DeltaSessionInterface ds = (DeltaSessionInterface) session; if (ds.getExpired()) { if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Expired session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } } else { if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Destroying session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } getSessionCache().destroySession(session.getId()); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Destroyed session " + session.getId() + " from " + getSessionCache().getOperatingRegionName()); } } }
this + ": Finding session " + id + " in " + getSessionCache().getOperatingRegionName()); DeltaSessionInterface session = (DeltaSessionInterface) getSessionCache().getSession(id); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Did not find session " + id + " in " + getSessionCache().getOperatingRegionName()); + getSessionCache().getOperatingRegionName() + ": " + session);
session.setManager(this); Region region = getSessionCache().getOperatingRegion(); DeltaSessionInterface existingSession = (DeltaSessionInterface) region.get(session.getId());
@Override public boolean isBackingCacheAvailable() { return sessionCache.isBackingCacheAvailable(); }
protected void initializeSessionCache() { // Retrieve the cache GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.getAnyInstance(); if (cache == null) { throw new IllegalStateException( "No cache exists. Please configure either a PeerToPeerCacheLifecycleListener or ClientServerCacheLifecycleListener in the server.xml file."); } // Create the appropriate session cache this.sessionCache = cache.isClient() ? new ClientServerSessionCache(this, cache) : new PeerToPeerSessionCache(this, cache); // Initialize the session cache this.sessionCache.initialize(); }
public DeltaSessionStatistics getStatistics() { return getSessionCache().getStatistics(); }
@Override public void add(Session session) { // super.add(session); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Storing session " + session.getId() + " into " + getSessionCache().getOperatingRegionName()); } getSessionCache().putSession(session); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Stored session " + session.getId() + " into " + getSessionCache().getOperatingRegionName()); } getSessionCache().getStatistics().incSessionsCreated(); }
private void initializeRegion(DeltaSessionManager sessionManager) { // Get the session region name this.sessionRegionName = sessionManager.getRegionName(); // Get the operating region. // If a P2P manager is used, then this will be a local region fronting the // session region if local cache is enabled; otherwise, it will be the // session region itself. // If a CS manager is used, it will be the session proxy region. this.operatingRegion = sessionManager.getSessionCache().getOperatingRegion(); if (sessionManager.getLogger().isDebugEnabled()) { sessionManager.getLogger().debug(this + ": Set operating region: " + this.operatingRegion); } }
@Override public String getRegionAttributesId() { // This property will be null if it hasn't been set in the context.xml file. // Since its default is dependent on the session cache, get the default from // the session cache. if (this.regionAttributesId == null) { this.regionAttributesId = getSessionCache().getDefaultRegionAttributesId(); } return this.regionAttributesId; }