/** * Returns the number of active sessions * * @return number of sessions active */ @Override public int getActiveSessions() { return getSessionCache().size(); }
@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 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 void initialize() { // Register Functions registerFunctions(); // Create or retrieve the region createOrRetrieveRegion(); // If local cache is enabled, create the local region fronting the session region // and set it as the operating region; otherwise, use the session region directly // as the operating region. this.operatingRegion = getSessionManager().getEnableLocalCache() ? createOrRetrieveLocalRegion() : this.sessionRegion; // Create or retrieve the statistics createStatistics(); }
@Override public void run() { int currentActiveSessions = getSessionCache().size(); if (currentActiveSessions > getMaxActive()) { setMaxActive(currentActiveSessions); if (getLogger().isDebugEnabled()) { getLogger().debug( DeltaSessionManager.this + ": Set max active sessions: " + currentActiveSessions); } } } };
public boolean isClientServer() { return getSessionCache().isClientServer(); }
public DeltaSessionStatistics getStatistics() { return getSessionCache().getStatistics(); }
public boolean isPeerToPeer() { return getSessionCache().isPeerToPeer(); }
public boolean isCommitEnabled() { DeltaSessionManager mgr = (DeltaSessionManager) getManager(); return mgr.isCommitValveEnabled(); }
private void checkBackingCacheAvailable() { if (!((SessionManager) getManager()).isBackingCacheAvailable()) { throw new IllegalStateException("No backing cache server is available."); } }
protected void logError(Exception e) { if (getManager() != null) { DeltaSessionManager mgr = (DeltaSessionManager) getManager(); mgr.getLogger().error(e); } }
/** * Construct a new Session associated with the specified Manager. * * @param manager The manager with which this Session is associated */ public DeltaSession(Manager manager) { super(manager); setOwner(manager); }
@Override public Object run() { return new DeltaSessionFacade(fsession); } });
@Override public void apply(DeltaSessionInterface session) { session.localDestroyAttribute(this.attributeName); }
@Override public void apply(DeltaSessionInterface session) { session.localUpdateAttribute(this.attributeName, this.attributeValue); }
@Override protected StandardSession getNewSession() { return new DeltaSession9(this); } }
@Override protected StandardSession getNewSession() { return new DeltaSession8(this); } }
@Override public Context getTheContext() { return getContext(); }
@Override public Context getTheContext() { return getContext(); }
@Override protected StandardSession getNewSession() { return new DeltaSession7(this); }