Package com.ericsson.ssa.sip.timer

Examples of com.ericsson.ssa.sip.timer.ServletTimerImpl


        Set<String> nonPersistentTimerIds = getNonPersistentApplicationTimerIds(false);
        List<ServletTimer> timers = new ArrayList<ServletTimer>(persistentTimerIds.size() +
                nonPersistentTimerIds.size());

        for (String id : persistentTimerIds) {
            ServletTimerImpl st = null;
            try {
                st = getSipSessionManager().findServletTimer(id, loadDependencies);
            } catch (RemoteLockException e) {
                throw new RemoteLockRuntimeException(e);
            }
            if (st != null) {
                timers.add(st);
            }
        }

        for (String id : nonPersistentTimerIds) {
            ServletTimerImpl st = null;
            st = findServletTimerLocally(id, loadDependencies);
            if (st != null) {
                timers.add(st);
            }
        }
View Full Code Here


    }

    protected void cancelNonPersistentTimers() {
        Set<String> nonPersistentTimerIds = getNonPersistentApplicationTimerIds(false);
        for (String id : nonPersistentTimerIds) {
            ServletTimerImpl st = findServletTimerLocally(id, false);
            if (st != null) {
                st.cancel(true);
            }
        }
    }
View Full Code Here

    }

    public ServletTimerImpl findServletTimer(String id,
                                             boolean loadDependencies)
            throws RemoteLockException {
        ServletTimerImpl servletTimer = super.findServletTimer(id);

        if (servletTimer != null) {
            return servletTimer;
        }
View Full Code Here

     *
     * @return The ServletTimer with the given id, or null if not
     * found
     */
    public ServletTimerImpl findServletTimerFromCacheOnly(String id) {
        ServletTimerImpl result = null;
        try {
            result = super.findServletTimer(id);
        } catch (RemoteLockException ex) {
            // Could never happen, since we are fetching from the local active cache!!
            if (log.isLoggable(Level.WARNING)) {
View Full Code Here

            throws IOException, RemoteLockException {
        if (servletTimerStore == null) {
            return null;
        }

        ServletTimerImpl servletTimer = servletTimerStore.load(id, loadDependencies);

        if (servletTimer == null) {
            return null;
        }

        boolean isActivated = servletTimer.activate();
        if (!isActivated) {
            return null;
        }

        return servletTimer;
View Full Code Here

    }
   
    public ReplicableEntity findServletTimerAndPassivate(String id,
                                                         AtomicBoolean cachedSTIsLocal) {
        HAServletTimer haServletTimer = null;
        ServletTimerImpl servletTimer
                = findServletTimerFromCacheOnly(id);
        if (servletTimer instanceof HAServletTimer) {
            haServletTimer = (HAServletTimer) servletTimer;
            if (haServletTimer != null && !haServletTimer.isForegroundLocked()) {
                processLoadReceivedServletTimer(haServletTimer.getId());
View Full Code Here

    public void processLoadReceivedServletTimer(String id) {
        //  call unregisterServletTimerExtraParam()
        activationHelper.unregisterServletTimerMigrationTask(id);
        //remove active timer if present and not locked
        ServletTimerImpl timer = findServletTimerFromCacheOnly(id);
        if(timer != null && !timer.isForegroundLocked()) {       
            timer.passivate();
        }
    }
View Full Code Here

        }
        if(id == null) {
            return;
        }
        //try to load from local cache first
        ServletTimerImpl activeTimer = this.findServletTimerFromCacheOnly(id);
        if(activeTimer != null) {
            //if calledFromSelf we suppress the load received acknowledgement
            if(!calledFromSelf) {
                //if we already have an active timer - just short-circuit by calling
                //load received
View Full Code Here

    public ServletTimerImpl findServletTimerFromCacheOnly(String id) {
        if (id == null)
            return (null);
        Object monitor = getReplicationSessionMonitor(id);
        synchronized(monitor) {
            ServletTimerImpl st = super.findServletTimerFromCacheOnly(id);
            if (st != null && !st.isPersistent()) {
                return st;
            }
            HAServletTimer result = (HAServletTimer)st;
            if(!this.isActiveCacheReconciliationOngoing()) {
                return result;
View Full Code Here

            }
        }
    }
   
    protected void clearFromServletTimerManagerCache(String id) {
        ServletTimerImpl timer
            = super.findServletTimerFromCacheOnly(id);
        if(timer != null) {                              
            this.removeServletTimerFromCache(timer);
        }
    }
View Full Code Here

TOP

Related Classes of com.ericsson.ssa.sip.timer.ServletTimerImpl

Copyright © 2018 www.massapicom. 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.