首页 > 编程语言 >20230713 java.util.concurrent.ScheduledExecutorService

20230713 java.util.concurrent.ScheduledExecutorService

时间:2023-08-22 17:47:46浏览次数:41  
标签:java schedule util concurrent ScheduledExecutorService public

介绍

  • java.util.concurrent.ScheduledExecutorService
  • public interface ScheduledExecutorService extends ExecutorService

API

  • schedule
    • public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit);
    • public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit);
  • scheduleAtFixedRate
  • scheduleWithFixedDelay

标签:java,schedule,util,concurrent,ScheduledExecutorService,public
From: https://www.cnblogs.com/huangwenjie/p/17649203.html

相关文章

  • 20230713 java.util.concurrent.ThreadPoolExecutor
    介绍java.util.concurrent.ThreadPoolExecutorpublicclassThreadPoolExecutorextendsAbstractExecutorServiceAPI构造器ThreadPoolExecutor(intcorePoolSize,intmaximumPoolSize,longkeepAliveTime,TimeUnitunit,BlockingQueue<Runnable>workQueue)Thr......
  • 20230618 java.util.stream.BaseStream
    介绍java.util.stream.BaseStreampublicinterfaceBaseStream<T,SextendsBaseStream<T,S>>extendsAutoCloseableAPIiterator返回流的迭代器终结操作spliterator返回可拆分迭代器终结操作isParallel是否并行流sequential返回一个等效的串行流中......
  • 20230619 java.util.IntSummaryStatistics
    介绍java.util.IntSummaryStatisticspublicclassIntSummaryStatisticsimplementsIntConsumer统计的指标:count,sum,min,average,maxAPI构造器IntSummaryStatistics()IntSummaryStatistics(longcount,intmin,intmax,longsum)publiccombinevoidcombi......
  • 20230619 java.util.Optional
    介绍java.util.Optional类声明@jdk.internal.ValueBasedpublicfinalclassOptional<T>包装一个可能为null的值只有在正确使用的情况下才会更安全对应基本类型类:OptionalInt,OptionalLong,OptionalDoubleAPIstatic创建OptionalemptyofofNullablepublic......
  • 20230619 java.util.Random
    介绍java.util.RandompublicclassRandomimplementsRandomGenerator,java.io.SerializableAPI构造器Random()Random(longseed)seed:种子值,如果用相同的java.util.Random对象和相同的种子值来生成随机数,那么每次生成的随机数序列将是完全相同的publicsetSe......
  • 20230619 java.util.random.RandomGenerator
    介绍java.util.random.RandomGeneratorpublicinterfaceRandomGeneratorjava.util.Random的父接口APIstaticofgetDefaultpublicisDeprecated是否废弃doublesDoubleStreamdoubles()无限流[0,1)DoubleStreamdoubles(doublerandomNumberOrigin,d......
  • 20230608 java.util.concurrent.locks.AbstractQueuedSynchronizer
    介绍java.util.concurrent.locks.AbstractQueuedSynchronizerpublicabstractclassAbstractQueuedSynchronizerextendsAbstractOwnableSynchronizerimplementsjava.io.Serializable提供一个框架,用于实现依赖于先进先出(FIFO)等待队列的阻塞锁和相关同步器(信号量、事件......
  • 20230608 java.util.concurrent.locks.Condition
    介绍java.util.concurrent.locks.ConditionpublicinterfaceConditionCondition将Object监视器方法(wait、notify和notifyAll)分解为不同的对象,通过将它们与任意Lock实现的使用相结合,从而产生每个对象具有多个等待集的效果。在Lock取代synchronized方法和语句的使用的地方......
  • 20230608 java.util.concurrent.locks.LockSupport
    介绍java.util.concurrent.locks.LockSupportpublicclassLockSupportAPIstaticsetCurrentBlockervoidsetCurrentBlocker(Objectblocker)设置当前线程的阻塞对象getBlockerObjectgetBlocker(Threadt)返回提供给最近一次调用尚未解除阻塞的park方法的阻塞......
  • 20230608 java.util.concurrent.locks.ReentrantLock
    介绍java.util.concurrent.locks.ReentrantLockpublicclassReentrantLockimplementsLock,java.io.SerializableReentrantLock是使用AQS的标准范式API构造器ReentrantLock()ReentrantLock(booleanfair)fair:是否公平锁,默认非公平锁public实现接口java.u......