Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.threading
Class SingleThreadInvoker

java.lang.Object
  extended by com.genesyslab.platform.commons.threading.SingleThreadInvoker
All Implemented Interfaces:
AsyncInvoker

public class SingleThreadInvoker
extends java.lang.Object
implements AsyncInvoker

Invoker which performs its tasks in dedicated single thread. The thread is created upon creation of invoker itself and stopped on dispose(), so no tasks will be executed after invoker disposal.


Constructor Summary
SingleThreadInvoker()
           
SingleThreadInvoker(java.lang.String name)
           
SingleThreadInvoker(java.lang.String name, int queueSize)
           
 
Method Summary
static void awaitTermination(java.lang.Runnable completionHandler)
          Deprecated. It is for internal use only!
 void dispose()
          Makes a hint to invoker that it's not used anymore and, PROBABLY, should be stopped and all associated resources - freed.
static int getLiveInvokerCount()
          Check count of invokers that have not been released or disposed yet.
 java.lang.String getName()
           
static java.lang.String getStateInfo()
          Deprecated. for internal use only!!!
 void invoke(java.lang.Runnable target)
          Submit the task to this invoker.
 void release()
           
 void unused()
           
 void used()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleThreadInvoker

public SingleThreadInvoker()

SingleThreadInvoker

public SingleThreadInvoker(java.lang.String name)

SingleThreadInvoker

public SingleThreadInvoker(java.lang.String name,
                           int queueSize)
Method Detail

getName

public java.lang.String getName()

invoke

public void invoke(java.lang.Runnable target)
Description copied from interface: AsyncInvoker
Submit the task to this invoker.

Specified by:
invoke in interface AsyncInvoker
Parameters:
target - Task to execute

release

public void release()

dispose

public void dispose()
Description copied from interface: AsyncInvoker
Makes a hint to invoker that it's not used anymore and, PROBABLY, should be stopped and all associated resources - freed. Note that Invoker is usually shared between multiple channels, so call of this method from one channel doesn't mean it is really free.

Specified by:
dispose in interface AsyncInvoker

used

public void used()

unused

public void unused()

getLiveInvokerCount

public static int getLiveInvokerCount()
Check count of invokers that have not been released or disposed yet.

Returns:
count of invokers that have not been released or disposed yet.

awaitTermination

@Deprecated
public static void awaitTermination(java.lang.Runnable completionHandler)
Deprecated. It is for internal use only!

Request one time notification when all invokers are released or disposed and all invoker's threads are stopped.


getStateInfo

@Deprecated
public static java.lang.String getStateInfo()
Deprecated. for internal use only!!!


Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.