private void relinquishSessionOwnership(boolean remove) { SessionOwnershipSupport support = this.distributedCacheManager.getSessionOwnershipSupport(); if (support != null) { support.relinquishSessionOwnership(this.realId, remove); } }
private void addLocal(Collection<String> localIds, Collection<String> ids) { for (String id: ids) { if (this.proxy_.isLocal(id)) { localIds.add(id); } } }
/** * {@inheritDoc} */ public boolean isPassivationEnabled() { return (passivationMode_ && proxy_.isPassivationEnabled()); }
proxy_.start(); batchingManager = proxy_.getBatchingManager(); if(batchingManager == null)
private void acquireSessionOwnership() SessionOwnershipSupport support = this.distributedCacheManager.getSessionOwnershipSupport(); update(this.distributedCacheManager.getSessionData(this.realId, false));
Map<String, String> sessions = proxy_.getSessionIds(); if (sessions != null) try IncomingDistributableSessionData sessionData = proxy_.getSessionData(realId, owner, false); if (sessionData == null)
proxy_.evictSession(realId, osu.getOwner()); proxy_.removeSessionLocal(realId);
private void bruteForceCleanup(String realId, Exception ex) { log_.warn("Standard expiration of session " + realId + " failed; switching to a brute " + "force cleanup. Problem is" + ex.getLocalizedMessage()); try { proxy_.removeSessionLocal(realId, null); } catch (Exception e) { log_.error("processExpirationPassivation(): Caught exception " + "during brute force cleanup of unloaded session " + realId + " session will be removed from Manager " + "but may still exist in distributed cache", e); } finally { // Get rid of our refs even if distributed store fails unloadedSessions_.remove(realId); stats_.removeStats(realId); } }
/** * Session passivation logic for sessions only in the distributed store. * * @param realId the session id, minus any jvmRoute */ private void processUnloadedSessionPassivation(String realId, OwnedSessionUpdate osu) { if (trace_) { log_.trace("Passivating session with id: " + realId); } proxy_.evictSession(realId, osu.getOwner()); osu.setPassivated(true); sessionPassivated(); }
@Override public String locate(String sessionId) { return this.proxy_.locate(sessionId); }
/** * Remove myself from the distributed cache. */ public void removeMyself() { getDistributedCacheManager().removeSession(getRealId()); }
IncomingDistributableSessionData data = proxy_.getSessionData(realId, initialLoad); if (data != null)
proxy_.start(); batchingManager = proxy_.getBatchingManager(); if(batchingManager == null)
/** * Remove myself from the <t>local</t> instance of the distributed cache. */ public void removeMyselfLocal() { getDistributedCacheManager().removeSessionLocal(getRealId()); }
proxy_.evictSession(realId); sessionPassivated();
proxy_.removeSessionLocal(realId, osu.getOwner()); unloadedSessions_.remove(realId); stats_.removeStats(realId);
/** * {@inheritDoc} * <p> * Overrides the superclass version to ensure that the generated id * does not duplicate the id of any other session this manager is aware of. * </p> */ @Override protected String getNextId() { while (true) { String id = super.getNextId(); if (sessions_.containsKey(id) || unloadedSessions_.containsKey(id)) { duplicates_.incrementAndGet(); } // Make sure that generated id will cache locally else if (this.proxy_.isLocal(id)) { return id; } } }