|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.link.LnkObject
com.neeve.link.LnkLTPAuthority
public final class LnkLTPAuthority
Allocates LTPs for link tree endpoints.
The LTP authority hands out LTPs to nodes (endpoints) in link trees. The
authority manages static and dynamic LTPs. Static LTPs are configured in
the '/ltps' simple entity container in the configuration repository. Dynamic
LTPs are handed out from the set of non-static LTPs. The maximum number of
LTPs that can be allocated in a Neeve application is set by MAX_LTP
.
Field Summary | |
---|---|
static short |
MAX_LTP
Largest LTP that can be allocated by any link tree node. |
Method Summary | |
---|---|
short |
alloc()
Allocate an LTP. |
static LnkLTPAuthority |
getInstance()
Return the singleton link LTP authority instance |
short |
getStatic(String name)
Get a static LTP by name. |
void |
release(short ltp)
Release an LTP. |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short MAX_LTP
This constant specifies the largest LTP that can be allocated by any link tree node in a Neeve application i.e. the maximum number of link tree nodes across all link trees is a Neeve application is equal to this constant plus 1.
Method Detail |
---|
public static LnkLTPAuthority getInstance()
public final short alloc() throws ELnkNoMoreLTPException
ELnkNoMoreLTPException
- Thrown in case all LTPs have already
been allocated.
This method allocates an unused LTP. A value of 0 is reserved for base link peer endpoints. So, we return a value between 1 and MAX_LTP
release(short)
public final short getStatic(String name) throws ELnkInvalidStaticLTPException
name
- The name of the static LTP.
ELnkInvalidStaticLTPException
- Thrown if the static LTP name was
not found in the static LTP table.
This method is used to query a static LTP. The caller provides the name of the static LTP i.e. the name of the entity that configures the static LTP as input and receives the LTP value in return. The method throws an exception if an invalid static LTP name is specified.
public final void release(short ltp)
This method releases a previously allocated LTP by alloc()
.
alloc()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |