Package railo.runtime.type.dt

Examples of railo.runtime.type.dt.DateTimeImpl


 
  * @param cachedwithin value to set
  **/
  public void setCachedwithin(TimeSpan cachedwithin)  {
    if(cachedwithin.getMillis()>0)
      this.cachedbefore=new DateTimeImpl(pageContext,System.currentTimeMillis()+cachedwithin.getMillis(),false);
    else clearCache=true;
  }
View Full Code Here


    return new QueryImpl(ThreadLocalPageContext.get(),dc,sql,maxrow,fetchsize,timeout,name);
  }
   
    @Override
    public DateTime createDateTime(long time) {
        return new DateTimeImpl(time,false);
    }
View Full Code Here

      execution=startDate+startTime;
    }
    else execution = calculateNextExecution(today,false);
    //long sleep=execution-today;
   
    log(Log.LEVEL_INFO,"first execution runs at "+new DateTimeImpl(execution,false).castToString(timeZone));
   
   
    while(true){
      sleepEL(execution,today);
     
      if(!engine.isRunning()) break;
     
      today=System.currentTimeMillis();
      long todayTime=util.getMilliSecondsInDay(null,today);
      long todayDate=today-todayTime;
     
      if(!task.isValid()) break;
      if(!task.isPaused()){
        if(endDate<todayDate && endTime<todayTime) {
          break;
        }
        execute();
      }
      if(isOnce)break;
      today=System.currentTimeMillis();
      execution=calculateNextExecution(today,true);
      log(Log.LEVEL_INFO,"next execution runs at "+new DateTimeImpl(execution,false).castToString(timeZone)+":"+today+":"+execution);
      //sleep=execution-today;
    }
  }
View Full Code Here

      qry.setAt(KeyConstants._name, row, task.subject());
      qry.setAt(KeyConstants._detail, row, task.detail());
      qry.setAt(KeyConstants._id, row, task.getId());

     
      qry.setAt(LAST_EXECUTION, row,new DateTimeImpl(task.lastExecution(),true));
      qry.setAt(NEXT_EXECUTION, row,new DateTimeImpl(task.nextExecution(),true));
      qry.setAt(CLOSED, row,Caster.toBoolean(task.closed()));
      qry.setAt(TRIES, row,Caster.toDouble(task.tries()));
      qry.setAt(TRIES_MAX, row,Caster.toDouble(task.tries()));
      qry.setAt(KeyConstants._exceptions, row,translateTime(task.getExceptions()));
     
View Full Code Here

    exp=(Array) Duplicator.duplicate(exp,true);
    Iterator<Object> it = exp.valueIterator();
    Struct sct;
    while(it.hasNext()) {
      sct=(Struct) it.next();
      sct.setEL(KeyConstants._time,new DateTimeImpl(Caster.toLongValue(sct.get(KeyConstants._time,null),0),true));
    }
    return exp;
  }
View Full Code Here

    while(it.hasNext()) {
        PageSource ps= pageSources.get(it.next());
        DumpTable inner = new DumpTable("#FFCC00","#FFFF00","#000000");
      inner.setWidth("100%");
      inner.appendRow(1,new SimpleDumpData("source"),new SimpleDumpData(ps.getDisplayPath()));
      inner.appendRow(1,new SimpleDumpData("last access"),DumpUtil.toDumpData(new DateTimeImpl(pageContext,ps.getLastAccessTime(),false), pageContext,maxlevel,dp));
      inner.appendRow(1,new SimpleDumpData("access count"),new SimpleDumpData(ps.getAccessCount()));
      table.appendRow(1,new SimpleDumpData("Sources"),inner);
    }
    return table;
  }
View Full Code Here

   * @param date
   * @param mask
   * @return formated date
   */
  public String format(Date date,String mask) {
    DateTime dt=(date instanceof DateTime)?(DateTime)date:new DateTimeImpl(date.getTime(),false);
    return format(dt,mask,null);
  }
View Full Code Here

                thread=pc.getThread();
                if(thread==Thread.currentThread()) continue;
               
              
               
                data.setEL("startTime", new DateTimeImpl(pc.getStartTime(),false));
                data.setEL("endTime", new DateTimeImpl(pc.getStartTime()+pc.getRequestTimeout(),false));
                data.setEL(KeyConstants._timeout,new Double(pc.getRequestTimeout()));

               
                // thread
                sctThread.setEL(KeyConstants._name,thread.getName());
View Full Code Here

            StackTraceElement[] st = pc.getThread().getStackTrace();
            configWeb.getConfigDir();
            configWeb.getId();
            configWeb.getConfigDir();
            qry.setAt("Id",row,new Double(pc.getId()));
            qry.setAt("Start",row,new DateTimeImpl(pc.getStartTime(),false));
            qry.setAt("Timeout",row,new Double(pc.getRequestTimeout()/1000));
            qry.setAt("ThreadType",row,pc.getParentPageContext()==null?"main":"child");
            qry.setAt("StackTrace",row,toString(st));
            qry.setAt("TagContext",row,PageExceptionImpl.getTagContext(pc.getConfig(), st));
           
View Full Code Here

        qry.setAt("name", row, task.subject());
        qry.setAt("detail", row, task.detail());
        qry.setAt("id", row, task.getId());
 
       
        qry.setAt("lastExecution", row,new DateTimeImpl(pageContext,task.lastExecution(),true));
        qry.setAt("nextExecution", row,new DateTimeImpl(pageContext,task.nextExecution(),true));
        qry.setAt("closed", row,Caster.toBoolean(task.closed()));
        qry.setAt("tries", row,Caster.toDouble(task.tries()));
        qry.setAt("triesmax", row,Caster.toDouble(task.tries()));
        qry.setAt("exceptions", row,translateTime(task.getExceptions()));
       
View Full Code Here

TOP

Related Classes of railo.runtime.type.dt.DateTimeImpl

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.