KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > space > UMOSpace


1 /*
2  * $Id: UMOSpace.java 3865 2006-11-09 17:11:08Z Lajos $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.umo.space;
12
13 import org.mule.umo.UMOTransactionFactory;
14 import org.mule.umo.lifecycle.Disposable;
15
16 /**
17  * A space provides a "store" for shared objects. Spaces are tread-safe and can be
18  * transactional and can also be distributed allowing a shared memory space between
19  * multiple clients on a network.
20  */

21 public interface UMOSpace extends Disposable
22 {
23
24     public void addListener(UMOSpaceEventListener listener);
25
26     public void removeListener(UMOSpaceEventListener listener);
27
28     public String JavaDoc getName();
29
30     public void put(Object JavaDoc value) throws UMOSpaceException;
31
32     public void put(Object JavaDoc value, long lease) throws UMOSpaceException;
33
34     public Object JavaDoc take() throws UMOSpaceException;
35
36     public Object JavaDoc take(long timeout) throws UMOSpaceException;
37
38     public Object JavaDoc takeNoWait() throws UMOSpaceException;
39
40     public int size();
41
42     void setTransactionFactory(UMOTransactionFactory txFactory);
43
44     UMOTransactionFactory getTransactionFactory();
45
46     void beginTransaction() throws UMOSpaceException;
47
48     void commitTransaction() throws UMOSpaceException;
49
50     void rollbackTransaction() throws UMOSpaceException;
51
52 }
53
Popular Tags