Examples of expire()


Examples of org.apache.catalina.Session.expire()

                    break;
                }
                case SessionMessage.EVT_SESSION_EXPIRED: {
                    Session session = findSession(msg.getSessionID());
                    if ( session != null ) {
                        session.expire();
                        this.remove(session);
                    }//end if
                    break;
                }
                case SessionMessage.EVT_SESSION_ACCESSED :{
View Full Code Here

Examples of org.apache.catalina.Session.expire()

        if( s==null ) {
            if(log.isInfoEnabled())
                log.info("Session not found " + sessionId);
            return;
        }
        s.expire();
    }

    public long getLastAccessedTimestamp( String sessionId ) {
        Session s=(Session)sessions.get(sessionId);
        if(s== null)
View Full Code Here

Examples of org.apache.catalina.Session.expire()

        Session sessions[] = findSessions();
        for (int i = 0; i < sessions.length; i++) {
            Session session = sessions[i];
            try {
                if (session.isValid()) {
                    session.expire();
                }
            } catch (Throwable t) {
                ;
            } finally {
                // Measure against memory leaking if references to the session
View Full Code Here

Examples of org.apache.catalina.Session.expire()

         try
         {
            Session sess = mgr.findSession(sessId);
            if (sess != null)
            {
               sess.expire();
               return true;
            }
         }
         catch (IOException ignored)
         {
View Full Code Here

Examples of org.jamesii.core.util.misc.session.IExpiring.expire()

    WeakReference<IExpiring> testRef = new WeakReference<>(sessionObject);
    assertNotNull(testRef.get());
    sessionObject.activated();
    sessionObject.hasBeenActive();
    sessionObject.hasBeenActive();
    sessionObject.expire();
    sessionObject = null;
    System.gc();
    assertNull("There should be no references left to the object.",
        testRef.get());
  }
View Full Code Here

Examples of org.jasig.cas.ticket.TicketGrantingTicket.expire()

    public void testTGTThatIsExpired() throws Exception {
        final OpenIdCredentials c = new OpenIdCredentials("test", "test");
        final TicketGrantingTicket t = getTicketGrantingTicket();
        this.ticketRegistry.addTicket(t);
       
        t.expire();
        assertFalse(this.openIdCredentialsAuthenticationHandler.authenticate(c));
    }
   
    public void testTGTWithDifferentId() throws Exception {
        final OpenIdCredentials c = new OpenIdCredentials("test", "test1");
View Full Code Here

Examples of org.jasig.cas.ticket.TicketGrantingTicketImpl.expire()

    private void populateRegistryWithExpiredTickets() {
        for (int i = 0; i < 10; i++) {
            TicketGrantingTicket ticket = new TicketGrantingTicketImpl("test"
                + i, TestUtils.getAuthentication(),
                new NeverExpiresExpirationPolicy());
            ticket.expire();
            this.ticketRegistry.addTicket(ticket);
        }
    }
}
View Full Code Here

Examples of org.wso2.caching.CachedObject.expire()

                // stop any following mediators from executing
                return false;

            } else {
                // cache exists, but has expired...
                cachedObj.expire();
                cachedObj.setTimeout(timeout);
                synLog.traceOrDebug("Existing cached response has expired. Reset cache element");

                cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
//                Replicator.replicate(cfgCtx, new String[]{cacheManagerKey});
View Full Code Here

Examples of org.wso2.caching.CachedObject.expire()

                // stop any following mediators from executing
                return false;

            } else {
                // cache exists, but has expired...
                cachedObj.expire();
                cachedObj.setTimeout(timeout);
                synLog.traceOrDebug("Existing cached response has expired. Reset cache element");

                cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
//                Replicator.replicate(cfgCtx, new String[]{cacheManagerKey});
View Full Code Here

Examples of redis.clients.jedis.Jedis.expire()

            long begin = System.currentTimeMillis();
            // 操作setnx与expire成功返回1,失败返回0,仅当均返回1时,实际操作成功
            Long result = jedis
                    .setnx(SafeEncoder.encode(key), serialize(value));
            if (expiration > 0) {
                result = result & jedis.expire(key, expiration);
            }
            long end = System.currentTimeMillis();
            if (result == 1L) {
                LOG.info("add key:" + key + " spends: " + (end - begin)
                        + " millionseconds.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.