API FOR ADVANCED USERS – This class is used with multithreaded applications. It lets you lock an entity once within a thread. More...
#include <ilserver/model.h>
Public Member Functions | |
IlsBoolean | lock () |
Locks the entity. More... | |
IlsBoolean | trylock () |
Tries to lock the entity. It returns IlsFalse if the lock cannot be taken. More... | |
IlsBoolean | unlock () |
Unlocks the entity. More... | |
![]() | |
IlsEntity (IlsIdentifier id, IlsActivity activity=IlsModel::GetDefaultActivity()) | |
IlsEntity (IlsEntity &rhs) | |
Copy constructor. The identifier is copied as well. | |
virtual | ~IlsEntity () |
Virtual destructor. | |
IlsActivity | getActivity () const |
Returns ILS_ACTIVE if the entity has been set as active. Otherwise, it returns ILS_INACTIVE . More... | |
virtual IlsString | getKeyIdentifier () const |
This virtual member function is used in subclasses of IlsViewed (see the IlsDynObject class). By default, it returns a null string. | |
virtual void | cut (ILS_CUT_DIRECTIVE=ILS_ALL) |
Cuts all the relations of which the entity is the target. More... | |
IlsIdentifier | getIdentifier () const |
Returns the identifier stored in the class IlsEntity . Thus, you do not have to store this identifier in the derived type. | |
void | rename (IlsIdentifier) |
Renames the identifier stored in the class IlsEntity . This function automatically maintains consistency in the dictionary containing the entity. More... | |
IlsBoolean | isIdentifierModified () |
During a notification phase, this member function returns IlsTrue if the entity identifier has been modified since the last notification phase. | |
IlsIdentifier | getOldIdentifier () |
During a notification phase, this member function returns the old identifier of the entity. It returns a null smart pointer if the entity has not been modified since the last notification phase. | |
IlsBoolean | remove () |
Overrides the function IlsViewed::remove() . More... | |
IlsBoolean | areUsersModified () |
During a notification phase, this function returns IlsTrue if a use relation has been added or removed since the last notification phase. More... | |
virtual IlsBoolean | isUpdateAllowed () |
By default, this virtual member function returns IlsFalse when the entity is locked and IlsTrue if you have the right to modify the entity. It is called if the static member function IlsModel::SetUpdateChecked() returns IlsTrue . | |
API FOR ADVANCED USERS – This class is used with multithreaded applications. It lets you lock an entity once within a thread.
Library: server
This type of lock is riskier than the type of lock defined using IlsSafelyLockableEntity
but offers better performance.
IlsSafelyLockableEntity
, IlsThread
.
|
virtual |
Locks the entity.
If the entity is locked by another thread, it will wait until the lock can be taken. The member function returns IlsFalse
if the operation fails.
An entity cannot be locked several times by the same thread.
Reimplemented from IlsEntity.
|
virtual |
|
virtual |
Unlocks the entity.
An entity can be unlocked:
This function returns IlsFalse
if an error occurs.
Reimplemented from IlsEntity.
© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.