tyrex.naming

Class MemoryBinding

public final class MemoryBinding extends Object

Name/value bindings for use inside MemoryContext. This one is never constructed directly but through MemoryContext, MemoryContextFactory and related classes.

Provides heirarchial storage for name/value binding in memory that is exposed through the JNDI context model. Each context (not in the tree) is represented by one instance of MemoryBinding, with each sub-context (child node) or bound value represented by a name/value pair.

This object is thread-safe.

Version: $Revision: 1.11 $ $Date: 2001/09/17 16:45:09 $

Author: Assaf Arkin

Field Summary
static intINITIAL_CAPACITY
The initial capacity for the hashtable.
static floatLOAD_FACTOR
The load factor for the hashtable.
static intMAXIMUM_CAPACITY
The maximum capacity for the hashtable.
protected MemoryBinding_parent
The parent memory binding.
Constructor Summary
MemoryBinding()
Method Summary
voiddebug(PrintWriter writer)
Returns an array of all the sub-contexts of this binding.
voiddestroy()
Called when destroying the subcontext and binding associated with it.
protected NamingEnumerationenumerate(Context context, boolean nameOnly)
Objectget(String name)
ContextgetContext()
StringgetName()
booleanisEmpty()
booleanisRoot()
voidput(String name, Object value)
Objectremove(String name)

Field Detail

INITIAL_CAPACITY

public static final int INITIAL_CAPACITY
The initial capacity for the hashtable.

LOAD_FACTOR

public static final float LOAD_FACTOR
The load factor for the hashtable.

MAXIMUM_CAPACITY

public static final int MAXIMUM_CAPACITY
The maximum capacity for the hashtable.

_parent

protected MemoryBinding _parent
The parent memory binding.

Constructor Detail

MemoryBinding

public MemoryBinding()

Method Detail

debug

void debug(PrintWriter writer)
Returns an array of all the sub-contexts of this binding.

destroy

public void destroy()
Called when destroying the subcontext and binding associated with it.

enumerate

protected NamingEnumeration enumerate(Context context, boolean nameOnly)

get

public Object get(String name)

getContext

public Context getContext()

getName

public String getName()

isEmpty

public boolean isEmpty()

isRoot

public boolean isRoot()

put

public void put(String name, Object value)

remove

public Object remove(String name)
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.