org.jpos.space
Interface LocalSpace<K,V>

All Superinterfaces:
Space<K,V>
All Known Implementing Classes:
JESpace, TSpace

public interface LocalSpace<K,V>
extends Space<K,V>

Version:
$Revision$ $Date$
Author:
Kris, Bharavi, Alejandro

Method Summary
 void addListener(Object key, SpaceListener listener)
          add a SpaceListener associated with a given key
 void addListener(Object key, SpaceListener listener, long timeout)
          add a SpaceListener associated with a given key for a given period of time.
 Set getKeySet()
           
 void removeListener(Object key, SpaceListener listener)
          removes a SpaceListener associated with a given key
 int size(Object key)
           
 
Methods inherited from interface org.jpos.space.Space
existAny, existAny, in, in, inp, out, out, push, push, put, put, rd, rd, rdp
 

Method Detail

addListener

void addListener(Object key,
                 SpaceListener listener)
add a SpaceListener associated with a given key

Parameters:
key - Entry's key
listener - a SpaceListener

addListener

void addListener(Object key,
                 SpaceListener listener,
                 long timeout)
add a SpaceListener associated with a given key for a given period of time. Warning: not supported by all space implementations.

Parameters:
key - Entry's key
listener - a SpaceListener
timeout -

removeListener

void removeListener(Object key,
                    SpaceListener listener)
removes a SpaceListener associated with a given key

Parameters:
key - Entry's key
listener - the SpaceListener

getKeySet

Set getKeySet()
Returns:
Set containing all keys in Space

size

int size(Object key)
Returns:
number of entries in a given key


Copyright © 1998-2012 jPOS.org. All Rights Reserved.