|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
x10.lang.PlaceLocalHandle<T>
final public struct class PlaceLocalHandle<T>
Declaration: PlaceLocalHandle[T]{T <: x10.lang.Object} implements x10.lang.Any, x10.lang.Any.
The primary operation on a PlaceLocalHandle is to use it to access an object on the current place. If the current place is not part of the distribution over which the PlaceLocalHandle is defined, a BadPlaceException will be thrown. A key concept for correct usage of PlaceLocalHandles is that in different places, the Handle may be mapped to distinct objects. For example (assuming >1 Place):
val plh:PlaceLocalHandle[T] = ....; val obj:T = plh(); at (here.next()) Console.out.println(plh() == obj);may print either true or false depending on how the application is using the particular PlaceLocalHandle (mapping the same object at multiple places or mapping distinct object at each place).
Method Summary | ||
---|---|---|
T |
operator()()
|
|
Int |
hashCode()
|
|
String |
toString()
|
|
static
|
make(Dist dist,
x10.lang. Fun_0_0<T> init)
Declaration: make[T](dist:x10.array.Dist,init:()=>T){}: x10.lang.PlaceLocalHandle[T]. Create a distributed object with local state of type T at each place in the argument distribution. |
|
static
|
makeFlat(Dist dist,
x10.lang. Fun_0_0<T> init)
Declaration: makeFlat[T](dist:x10.array.Dist,init:()=>T){}: x10.lang.PlaceLocalHandle[T]. Create a distributed object with local state of type T at each place in the argument distribution. |
|
String |
typeName()
|
|
Boolean |
equals(Any other)
|
|
Boolean |
equals(PlaceLocalHandle<T> other)
|
|
Boolean |
_struct_equals(Any other)
|
|
Boolean |
_struct_equals(PlaceLocalHandle<T> other)
|
|
PlaceLocalHandle<T> |
x10$lang$PlaceLocalHandle$$x10$lang$PlaceLocalHandle$this()
Declaration: x10$lang$PlaceLocalHandle$$x10$lang$PlaceLocalHandle$this(): x10.lang.PlaceLocalHandle[T]{self==this(:x10.lang.PlaceLocalHandle)}. The primary operation on a PlaceLocalHandle is to use it to access an object on the current place. |
Methods inherited from interface x10.lang.Any |
---|
toString, typeName, equals, hashCode |
Method Detail |
---|
public final T operator()()
public final Int hashCode()
public final String toString()
public static final <T> PlaceLocalHandle<T> make(Dist dist, x10.lang. Fun_0_0<T> init)
Create a distributed object with local state of type T at each place in the argument distribution. The local object will be initialized by evaluating init at each place. When this method returns, the local objects will be initialized and available via the returned PlaceLocalHandle instance at every place in the distribution.
dist
- A distribution specifiying the places where local objects should be created.init
- the initialization closure used to create the local object.
public static final <T> PlaceLocalHandle<T> makeFlat(Dist dist, x10.lang. Fun_0_0<T> init)
Create a distributed object with local state of type T at each place in the argument distribution. The local object will be initialized by evaluating init at each place. When this method returns, the local objects will be initialized and available via the returned PlaceLocalHandle instance at every place in the distribution. Require an initialization closure that does not change place asynchronously.
dist
- A distribution specifiying the places where local objects should be created.init
- the initialization closure used to create the local object.
public final String typeName()
public final Boolean equals(Any other)
public final Boolean equals(PlaceLocalHandle<T> other)
public final Boolean _struct_equals(Any other)
public final Boolean _struct_equals(PlaceLocalHandle<T> other)
public final PlaceLocalHandle<T> x10$lang$PlaceLocalHandle$$x10$lang$PlaceLocalHandle$this()
The primary operation on a PlaceLocalHandle is to use it to access an object on the current place. If the current place is not part of the distribution over which the PlaceLocalHandle is defined, a BadPlaceException will be thrown. A key concept for correct usage of PlaceLocalHandles is that in different places, the Handle may be mapped to distinct objects. For example (assuming >1 Place):
val plh:PlaceLocalHandle[T] = ....; val obj:T = plh(); at (here.next()) Console.out.println(plh() == obj);may print either true or false depending on how the application is using the particular PlaceLocalHandle (mapping the same object at multiple places or mapping distinct object at each place).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |