Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.ClockDaemon


    public ClockDaemon getClockDaemon() {
        return clockDaemon;
    }

    public void doStart() throws Exception {
        clockDaemon = new ClockDaemon();
        clockDaemon.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread t = new Thread(r, poolName + " ");
                t.setDaemon(true);
                return t;
View Full Code Here


    public ClockDaemon getClockDaemon() {
        return clockDaemon;
    }

    public void doStart() throws Exception {
        clockDaemon = new ClockDaemon();
        clockDaemon.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread t = new Thread(r, poolName + " ");
                t.setDaemon(true);
                return t;
View Full Code Here

    /**
     * Starts the reaper for dead/idle connections, if needed.
     */
    private synchronized void startReaper() {
        if (_daemon == null) {
            _daemon = new ClockDaemon();
            ThreadFactory creator =
                    new ThreadFactory(null, "ManagedConnectionReaper", false);
            _daemon.setThreadFactory(creator);

            if (_reapInterval > 0) {
View Full Code Here

    /**
     * Starts the reaper for dead/idle connections, if needed.
     */
    private synchronized void startReaper() {
        if (_daemon == null) {
            _daemon = new ClockDaemon();
            if (_idlePeriod > 0) {
                _daemon.setThreadFactory(new ThreadFactory() {
                    public Thread newThread(Runnable command) {
                        Thread thread = new Thread(command, "Reaper");
                        thread.setDaemon(true);
View Full Code Here

        // add cache to shrinker.
        if ( cattr.isUseDiskShrinker() )
        {
            if ( shrinkerDaemon == null )
            {
                shrinkerDaemon = new ClockDaemon();
                shrinkerDaemon.setThreadFactory( new MyThreadFactory() );
            }

            ShrinkerThread shrinkerThread = (ShrinkerThread) shrinkerThreadMap.get( cattr.getTableName() );
            if ( shrinkerThread == null )
View Full Code Here

        if ( cattr.getUseMemoryShrinker() )
        {
            if ( shrinkerDaemon == null )
            {
                shrinkerDaemon = new ClockDaemon();
                shrinkerDaemon.setThreadFactory( new MyThreadFactory() );
            }
            shrinkerDaemon.executePeriodically( cattr.getShrinkerIntervalSeconds() * 1000, new ShrinkerThread( this ),
                                                false );

View Full Code Here

        // todo only do the passive if receive is inenabled, perhaps set the
        // myhost to null or something on the request
        if ( senderDaemon == null )
        {
            senderDaemon = new ClockDaemon();
            senderDaemon.setThreadFactory( new MyThreadFactory() );
        }

        // create a sender thread
        sender = new UDPDiscoverySenderThread( getDiscoveryAddress(), getDiscoveryPort(), hostAddress, this
View Full Code Here

        // TODO we might need to stagger this a bit.
        if ( this.blockDiskCacheAttributes.getKeyPersistenceIntervalSeconds() > 0 )
        {
            if ( persistenceDaemon == null )
            {
                persistenceDaemon = new ClockDaemon();
                persistenceDaemon.setThreadFactory( new MyThreadFactory() );
            }
            persistenceDaemon
                .executePeriodically( this.blockDiskCacheAttributes.getKeyPersistenceIntervalSeconds() * 1000,
                                      new Runnable()
View Full Code Here

    public ClockDaemon getClockDaemon() {
        return clockDaemon;
    }

    public void doStart() throws Exception {
        clockDaemon = new ClockDaemon();
        clockDaemon.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread t = new Thread(r, poolName + " ");
                t.setDaemon(true);
                return t;
View Full Code Here

        return JMSExceptionHelper.newJMSException("Failed to recover from journal. Reason: " + e, e);
    }

    public ClockDaemon getClockDaemon() {
        if (clockDaemon == null) {
            clockDaemon = new ClockDaemon();
            clockDaemon.setThreadFactory(new ThreadFactory() {
                public Thread newThread(Runnable runnable) {
                    Thread thread = new Thread(runnable, "Checkpoint Timmer");
                    thread.setDaemon(true);
                    return thread;
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.ClockDaemon

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.