Codota Logo
PeriodicThreadScheduler
Code IndexAdd Codota to your IDE (free)

How to use
PeriodicThreadScheduler
in
us.ihmc.util

Best Java code snippets using us.ihmc.util.PeriodicThreadScheduler (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: us.ihmc/ihmc-robot-data-logger

public void start()
{
 scheduler.schedule(variableUpdateThread, 1, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/CommonWalkingControlModules

@Override
public void closeAndDispose()
{
 if (scheduler != null)
   scheduler.shutdown();
}
origin: us.ihmc/ihmc-robot-data-logger

public void stop()
{
 scheduler.shutdown();
 try
 {
   scheduler.awaitTermination(1, TimeUnit.SECONDS);
 }
 catch (InterruptedException e)
 {
 }
}

origin: us.ihmc/ihmc-robot-data-logger

public void start()
{
 scheduler.schedule(runner, 100, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/SensorProcessing

  public void stop()
  {
   scheduler.shutdown();
  }
}
origin: us.ihmc/ihmc-robot-data-logger

public void stop()
{
 scheduler.shutdown();
 try
 {
   scheduler.awaitTermination(5, TimeUnit.SECONDS);
 }
 catch (InterruptedException e)
 {
   e.printStackTrace();
 }
}
origin: us.ihmc/ihmc-ros2-library

/**
* Start publishing data for this RealtimeRos2Node
* 
* A periodic thread is spawned that will publish all data every millisecond. 
* 
*/
public void spin()
{
 startupLock.lock();
 if (spinning)
 {
   throw new RuntimeException("This RealtimeRos2Node is already spinning");
 }
 spinning = true;
 scheduler.schedule(this::realtimeNodeThread, THREAD_PERIOD_MICROSECONDS, TimeUnit.MICROSECONDS);
 startupLock.unlock();
}
origin: us.ihmc/ihmc-ros2-library

/**
* Stop the realtime periodic thread.
*/
public void stopSpinning()
{
 scheduler.shutdown();
 startupLock.lock();
 spinning = false;
}
origin: us.ihmc/SensorProcessing

private void startWriterThread()
{
 dataProducer.registerPacketToSkipQueue(RobotConfigurationData.class);
 scheduler.schedule(new Runnable()
 {
   @Override
   public void run()
   {
    try
    {
      if (robotConfigurationDataRingBuffer.poll())
      {
       RobotConfigurationData robotConfigData;
       while ((robotConfigData = robotConfigurationDataRingBuffer.read()) != null)
       {
         dataProducer.skipQueueAndSend(robotConfigData);
       }
       robotConfigurationDataRingBuffer.flush();
      }
    }
    catch(Throwable throwable)
    {
      throwable.printStackTrace();
    }
   }
 }, WORKER_SLEEP_TIME_MILLIS, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/IHMCRobotDataLogger

  public void close()
  {
   scheduler.shutdown();
   server.close();
   
  }
}
origin: us.ihmc/RobotDataCommunication

public void start()
{
 try
 {
   // Make server here, so it is open before the logger connects
   server = new MultiClientStreamingDataTCPServer(session.getPort(), handshakeBuilder, logModelProvider, compressedBackingArray.length, SEND_BUFFER_LENGTH);
   server.start();
 }
 catch (IOException e)
 {
   throw new RuntimeException(e);
 }
 scheduler.schedule(this, 1, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/RobotDataCommunication

  public void close()
  {
   scheduler.shutdown();
   server.close();
   
  }
}
origin: us.ihmc/IHMCRobotDataLogger

public void start()
{
 try
 {
   // Make server here, so it is open before the logger connects
   server = new MultiClientStreamingDataTCPServer(session.getPort(), handshakeBuilder, logModelProvider, summaryProvider, compressedBackingArray.length, SEND_BUFFER_LENGTH);
   server.start();
 }
 catch (IOException e)
 {
   throw new RuntimeException(e);
 }
 scheduler.schedule(this, 1, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/CommonWalkingControlModules

public ControllerNetworkSubscriber(CommandInputManager controllerCommandInputManager, StatusMessageOutputManager controllerStatusOutputManager,
   PeriodicThreadScheduler scheduler, PacketCommunicator packetCommunicator)
{
 this.controllerCommandInputManager = controllerCommandInputManager;
 this.controllerStatusOutputManager = controllerStatusOutputManager;
 this.scheduler = scheduler;
 this.packetCommunicator = packetCommunicator;
 listOfSupportedStatusMessages = controllerStatusOutputManager.getListOfSupportedMessages();
 if (packetCommunicator == null)
 {
   PrintTools.error(this, "No packet communicator, " + getClass().getSimpleName() + " cannot be created.");
   return;
 }
 listOfSupportedStatusMessages.add(InvalidPacketNotificationPacket.class);
 createAllSubscribersForSupportedMessages();
 createGlobalStatusMessageListener();
 createAllStatusMessageBuffers();
 if (scheduler != null)
   scheduler.schedule(this, 1, TimeUnit.MILLISECONDS);
}
origin: us.ihmc/ihmc-robot-data-logger

dataProducerParticipant.announce();
timestampScheduler.schedule(timestampPublisher, 100, TimeUnit.MICROSECONDS);
us.ihmc.utilPeriodicThreadScheduler

Most used methods

  • schedule
    Schedule a new periodic thread
  • shutdown
    Shutdown the periodic thread. No new runnables can be scheduled. Running threads are allowed to fini
  • awaitTermination
    Await termination of this thread. This will not stop the running thread. The timeout is optionally i

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JCheckBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now