J avolution v3.7 (J2SE 1.5+)

javolution.realtime
Class HeapContext

java.lang.Object
  extended by javolution.realtime.Context
      extended by javolution.realtime.HeapContext

public class HeapContext
extends Context

This class represents a heap context; it is used to allocate objects from the heap exclusively.

Version:
3.6, September 24, 2005
Author:
Jean-Marie Dautelle

Constructor Summary
HeapContext()
          Default constructor.
 
Method Summary
static HeapContext current()
          Returns the current heap context or null if the current thread executes within a pool context.
static void enter()
          Enters a HeapContext.
protected  void enterAction()
          The action to be performed after this context becomes the current context.
static void exit()
          Exits the current HeapContext.
protected  void exitAction()
          The action to be performed before this context is no more the current context.
 
Methods inherited from class javolution.realtime.Context
clear, enter, enter, exit, exit, getOuter, getOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeapContext

public HeapContext()
Default constructor.

Method Detail

current

public static HeapContext current()
Returns the current heap context or null if the current thread executes within a pool context.

Returns:
the current heap context.

enter

public static void enter()
Enters a HeapContext.


exit

public static void exit()
Exits the current HeapContext.

Throws:
java.lang.IllegalStateException - if the current context is not an instance of HeapContext.

enterAction

protected void enterAction()
Description copied from class: Context
The action to be performed after this context becomes the current context.

Specified by:
enterAction in class Context

exitAction

protected void exitAction()
Description copied from class: Context
The action to be performed before this context is no more the current context.

Specified by:
exitAction in class Context

J avolution v3.7 (J2SE 1.5+)

Copyright © 2006 Javolution.