net.sf.asyncobjects
Class Shared<T>
java.lang.Object
net.sf.asyncobjects.Shared<T>
- Type Parameters:
T
- type of value to share
public class Shared<T>
- extends Object
This wrapper object is used to explicitly return values from asynchronous
operations which are usually unsafe or unrecommended to return. Which however
are easy to return from asynchronous operations by mistake. Such objects are
usually marked with the ExplicitSharing
interface.
This wrapper allows explicit specification that such value is returned from
this operations despite the fact that in other situation it would have been
unsafe to return it
- Author:
- const
Field Summary |
T |
value
a shared value |
Constructor Summary |
Shared(T value)
A constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
public final T value
- a shared value
Shared
public Shared(T value)
- A constructor
- Parameters:
value
- a value to share
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.