public Timeout schedule ( long time , TimeoutTarget target ) { if ( cancelled . get ( ) ) throw new IllegalStateException ( "TimeoutFactory has been cancelled" ) ; if ( time < 0 ) throw new IllegalArgumentException ( "Negative time" ) ; if ( target == null ) throw new IllegalArgumentException ( "Null timeout target" ) ; return queue . offer ( time , target ) ; }
Schedules a new timeout .