public class ListJid<ENTRY_TYPE extends Jid> extends CollectionJid<ENTRY_TYPE> implements JAList
Modifier and Type | Field and Description |
---|---|
protected org.agilewiki.jactor.factory.ActorFactory |
entryFactory
Actor type of the elements.
|
int |
initialCapacity |
protected ArrayList<ENTRY_TYPE> |
list
A list of JID actors.
|
len
serializedBytes, serializedOffset
Constructor and Description |
---|
ListJid() |
Modifier and Type | Method and Description |
---|---|
void |
empty() |
protected org.agilewiki.jactor.factory.ActorFactory |
getEntryFactory()
Returns the JidFactory for all the elements in the list.
|
int |
getSerializedLength()
Returns the number of bytes needed to serialize the persistent data.
|
void |
iAdd(int i) |
void |
iAddBytes(int i,
byte[] bytes) |
ENTRY_TYPE |
iGet(int i)
Returns the ith JID component.
|
protected void |
initializeList()
Perform lazy initialization.
|
void |
iRemove(int i) |
void |
iSetBytes(int i,
byte[] bytes)
Creates a JID actor and loads its serialized data.
|
void |
load(ReadableBytes readableBytes)
Load the serialized data into the JID.
|
_Jid |
resolvePathname(String pathname)
Resolves a JID pathname, returning a JID actor or null.
|
protected void |
serialize(AppendableBytes appendableBytes)
Serialize the persistent data.
|
int |
size()
Returns the size of the collection.
|
change, loadLen, saveLen, skipLen
changed, copyJID, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, createSubordinate, getSerializedBytes, isJidEqual, isSerialized, readable, save, setContainerJid
acceptEvent, acceptRequest, getActorType, getAncestor, getExceptionHandler, getFactory, getMailbox, getMailboxFactory, getMatch, getParent, hasDataItem, haveEvents, initialize, initialize, initialize, initialize, initialize, requirements, responseFrom, send, send, sendEvent, setExceptionHandler, setInitialBufferCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
change, save, setContainerJid
public int initialCapacity
protected org.agilewiki.jactor.factory.ActorFactory entryFactory
protected ArrayList<ENTRY_TYPE extends Jid> list
public int size() throws Exception
size
in interface Collection<ENTRY_TYPE extends Jid>
Exception
public ENTRY_TYPE iGet(int i) throws Exception
iGet
in interface Collection<ENTRY_TYPE extends Jid>
i
- The index of the element of interest.
If negative, the index used is increased by the size of the collection,
so that -1 returns the last element.Exception
public int getSerializedLength()
getSerializedLength
in interface _Jid
getSerializedLength
in class Jid
public void load(ReadableBytes readableBytes) throws Exception
protected org.agilewiki.jactor.factory.ActorFactory getEntryFactory() throws Exception
Exception
protected void initializeList() throws Exception
Exception
- Any exceptions thrown during initialization.protected void serialize(AppendableBytes appendableBytes) throws Exception
public _Jid resolvePathname(String pathname) throws Exception
resolvePathname
in interface _Jid
resolvePathname
in class CollectionJid<ENTRY_TYPE extends Jid>
pathname
- A JID pathname.Exception
- Any uncaught exception which occurred while processing the request.public void iSetBytes(int i, byte[] bytes) throws Exception
iSetBytes
in interface Collection<ENTRY_TYPE extends Jid>
i
- The index of the desired element.bytes
- Holds the serialized data.Exception
- Any exceptions thrown while processing the request.public void iAddBytes(int i, byte[] bytes) throws Exception
public void iAdd(int i) throws Exception
public void empty() throws Exception
Copyright © 2013. All Rights Reserved.