Package org.projectodd.polyglot.core.util

Examples of org.projectodd.polyglot.core.util.TimeInterval


        assertNotNull( jobFour );
        assertEquals( "job.four", jobFour.getName() );
        assertEquals( "My long running job has timeout", jobFour.getDescription() );
        assertEquals( "01 01 01 15 * ?", jobFour.getCronExpression() );
        assertEquals( "MyLongRunningJob", jobFour.getRubyClassName() );
        assertEquals( new TimeInterval( 5000, TimeUnit.MILLISECONDS ), jobFour.getTimeout() );
        assertTrue( jobFour.isSingleton() );
        assertNotNull( jobFour.getGroup() );
        assertTrue( jobFour.isStopped() );

        assertEquals( jobOne.getGroup(), jobTwo.getGroup() );
View Full Code Here


        assertNotNull( jobOne );
        assertEquals( "job.one", jobOne.getName() );
        assertEquals( "My Job is routine", jobOne.getDescription() );
        assertEquals( "01 * * * * ?", jobOne.getCronExpression() );
        assertEquals( "MyNoUnitJobClass", jobOne.getRubyClassName() );
        assertEquals( new TimeInterval( 60, TimeUnit.SECONDS ), jobOne.getTimeout() );
        assertTrue( jobOne.isSingleton() );
        assertNotNull( jobOne.getGroup() );

    }
View Full Code Here

     * @see CountDownLatch
     * @see JobSchedulizer#createJob(String, String, org.projectodd.polyglot.core.util.TimeInterval, String, String, java.util.Map, boolean, boolean)
     */
    @SuppressWarnings("unused")
    public CountDownLatch createJob(String rubyClassName, String cronExpression, String timeout, String name, String description, Map<String, Object> config, boolean singleton, boolean stopped) {
        TimeInterval timeoutInterval = TimeInterval.parseInterval(timeout, TimeUnit.SECONDS);
        return createJob(rubyClassName, cronExpression, timeoutInterval, name, description, config, singleton, stopped);
    }
View Full Code Here

     * @return The latch (CountDownLatch) to wait for the task completion.
     * @see CountDownLatch
     */
    @SuppressWarnings("unused")
    public CountDownLatch createAtJob(String rubyClassName, Date startAt, Date endAt, long interval, int repeat, String timeout, String name, String description, Map<String, Object> config, boolean singleton) {
        TimeInterval timeoutInterval = TimeInterval.parseInterval(timeout, TimeUnit.SECONDS);
        return createAtJob(rubyClassName, startAt, endAt, interval, repeat, timeoutInterval, name, description, config, singleton);
    }
View Full Code Here

    public RubyJobProxy(RubyRuntimePool runtimePool, ComponentResolver resolver, JobDetail detail) {
        super( detail.getKey() );
        this.runtimePool = runtimePool;
        this.resolver = resolver;
        TimeInterval timeout = (TimeInterval)detail.getJobDataMap().get( "timeout" );
        if (timeout != null) {
            this.addListener( new TimeoutListener( timeout ) );
        }
    }
View Full Code Here

TOP

Related Classes of org.projectodd.polyglot.core.util.TimeInterval

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.