Den::CSubSessionIx Class Reference
class Den::CSubSessionIx : public CBase
|
class
CSubSessionIx
This sub-session container will maintain its own array of
TEntry
cells in memory as arrays provide for quick access in some situations. There will be two types of cells in the array; cells carrying pointers to sub-sessions and a virtual list of free cells. This layout means that with a handle, the entry holding the sub-session can be looked up in the container directly and if needing to insert a new entry the first free cell is indicated by iFreeListHead. The array will grow with EIndexGranularity each time it runs out of free entries. However, it maintains a high watermark and will never shrink. The handles are defined by TSubSessionHandle, which in the current architectures is a 32 bit word, constructed as needed. It is simple to deduct from the context so there is no need to store it.
0 8 16 31 |--------|--------|----------------| Type Magic Index
The three components comprising the handle are:
-
Type - 8 bit value. One of the members of CSockSubsession::TSubSessionType.
-
Magic - 8 bit value. Ensures that handles are not re-used immediately. Each time an entry is re-cycled this value increments, rolling around when reaching max.
-
Index - 16 bit value. The position in the array. CSockSubsession::TSubSessionType
Nested Classes and Structures
Constructor & Destructor Documentation
~CSubSessionIx()
IMPORT_C
|
~CSubSessionIx
|
(
|
)
|
|
Member Functions Documentation
ActiveCount()
TInt
|
ActiveCount
|
(
|
)
|
const [inline]
|
Add(CWorkerSubSession *, TSubSessionHandle &)
ExpandArray()
TInt
|
ExpandArray
|
(
|
)
|
[private]
|
Find(CWorkerSubSession *, TSubSessionHandle &)
IndexFromHandle(TInt)
TInt
|
IndexFromHandle
|
(
|
TInt
|
aHandle
|
)
|
const [private, inline]
|
Lock()
void
|
Lock
|
(
|
)
|
const [inline]
|
Optional locking. When accessing any of the public methods of this class in a multithreaded environment, locking is often necessary. This lock does not allow for lock nesting.
MakeHandle(TInt, TInt, TInt)
NONSHARABLE_CLASS(TIter)
NONSHARABLE_CLASS
|
(
|
TIter
|
|
)
|
[inline]
|
Remove(TSubSessionHandle)
Replace(TSubSessionHandle, CWorkerSubSession *)
Unlock()
void
|
Unlock
|
(
|
)
|
const [inline]
|
Member Enumerations Documentation
Enum anonymous
Enumerators
KTypeBits = 8
|
|
KMagicBits = 8
|
|
KIndexBits = 16
|
|
Member Type Definitions Documentation
Typedef TSubSessionHandle
typedef
TInt
|
TSubSessionHandle
|
Member Data Documentation
TInt
iActiveCount
TInt
|
iActiveCount
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.