NetKernel APIs


com.ten60.netkernel.transport
Class RequestBlocker

java.lang.Object
  extended bycom.ten60.netkernel.transport.RequestBlocker

public class RequestBlocker
extends Object

RequestBlocker
once block() is called all calls to check() will block. If interrupt() is called then all calls to check() with that id will thrown interrupted exceptions when release() is called and until clear() is called. All non interrupted calls to check() will return normally when release is called.


Constructor Summary
RequestBlocker()
           
 
Method Summary
 void block()
          Start blocking all check requests
 void check(Object aId)
          Blocking call to check if we are blocked or not.
 void clear()
          Clear interrupted list so that all checks can proceed optimally
 void interrupt(Object aId)
          Mark this Id to be interrupted
 void release()
          Release all blocked requests
 void releaseInterrupted()
          Release only interrupted blocked requests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestBlocker

public RequestBlocker()
Method Detail

check

public void check(Object aId)
           throws InterruptedException
Blocking call to check if we are blocked or not. If the id is interrupted the method will throw an interrupted exception otherwise it will return normally

Throws:
InterruptedException

block

public void block()
Start blocking all check requests


interrupt

public void interrupt(Object aId)
Mark this Id to be interrupted


release

public void release()
Release all blocked requests


releaseInterrupted

public void releaseInterrupted()
Release only interrupted blocked requests


clear

public void clear()
Clear interrupted list so that all checks can proceed optimally


NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.