const classafConcurrent::LocalList

sys::Obj
  afConcurrent::LocalList

Manages a List stored in Actor.locals with a unique key.

Note that LocalLists are lazy; that is, no List is created or stored in Actor.locals until accessed.

add

Source

@Operator
This add(Obj? val)

Add the specified item to the end of the list. Return this.

clear

Source

This clear()

Remove all key/value pairs from the map. Return this.

contains

Source

Bool contains(Obj? item)

Returns true if this list contains the specified item.

each

Source

Void each(|Obj?,Int c)

Call the specified function for every item in the list.

get

Source

@Operator
Obj? get(Int index)

Returns the item at the specified index. A negative index may be used to access an index from the end of the list.

isEmpty

Source

Bool isEmpty()

Return true if size() == 0

list

Source

Obj?[] list

Gets or sets the thread local list

localRef

Source

const LocalRef localRef

The LocalRef this LocalList wraps.

make

Source

new make(Str name := "LocalList", |This? f := null)

Makes a LocalList instance. name is passed to LocalList.

remove

Source

Obj? remove(Obj item)

Removes the specified item from the list, returning the removed item. If the item was not mapped then return null.

size

Source

Int size()

Get the number of values in the map.

valType

Source

const Type valType := sys::Obj?#

Used to parameterize the backing list.

LocalList("name") { it.valType = Str# }