"Fossies" - the Fresh Open Source Software Archive

Member "opensaf-5.21.09/src/imm/immnd/ImmModel.h" (14 Sep 2021, 23295 Bytes) of package /linux/misc/opensaf-5.21.09.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ImmModel.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 5.21.06_vs_5.21.09.

    1 /*      -*- OpenSAF  -*-
    2  *
    3  * (C) Copyright 2008 The OpenSAF Foundation
    4  * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
    5  *
    6  * This program is distributed in the hope that it will be useful, but
    7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    8  * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
    9  * under the GNU Lesser General Public License Version 2.1, February 1999.
   10  * The complete license can be accessed from the following location:
   11  * http://opensource.org/licenses/lgpl-license.php
   12  * See the Copying file included with the OpenSAF distribution for full
   13  * licensing terms.
   14  *
   15  * Author(s): Ericsson AB
   16  *
   17  */
   18 
   19 #ifndef IMM_IMMND_IMMMODEL_H_
   20 #define IMM_IMMND_IMMMODEL_H_ 1
   21 
   22 #include <saImmOm.h>
   23 #include <cstdarg>
   24 #include <sys/types.h>
   25 #include <string>
   26 #include <vector>
   27 #include <map>
   28 #include "imm/common/immsv_api.h"
   29 
   30 struct ClassInfo;
   31 struct CcbInfo;
   32 struct ObjectInfo;
   33 struct AdminOwnerInfo;
   34 struct ImplementerInfo;
   35 
   36 // TODO: Some of the struct forward declarations below are obsolete.
   37 
   38 struct ImmsvOmSearchInit;
   39 struct ImmsvOmCcbObjectCreate;
   40 struct ImmsvOmCcbObjectModify;
   41 struct ImmsvOmCcbObjectDelete;
   42 struct ImmsvOmClassDescr;
   43 struct ImmsvOmAdminOperationInvoke;
   44 struct ImmsvOmAdminOwnerInitialize;
   45 struct ImmsvAttrDefinition;
   46 struct immsv_octet_string;
   47 struct immsv_edu_attr_val;
   48 struct ImmsvOiImplSetReq;
   49 struct ImmsvOmObjectSync;
   50 struct immsv_a2nd_admown_set;
   51 struct ImmsvOmSearchOneAttr;
   52 struct ImmsvOmFinalizeSync;
   53 
   54 struct ImmOmClassDelete;
   55 struct ImmOmCcbObjectDelete;
   56 struct ImmOmCcbApply;
   57 struct ImmOiObjectImplementerSet;
   58 struct ImmOiRtObjectCreate;
   59 
   60 struct immsv_oi_ccb_upcall_rsp;
   61 struct immsv_attr_values_list;
   62 struct immsv_attr_mods_list;
   63 
   64 struct ImmsvOmRspSearchNext;
   65 
   66 struct ImmsvAttrNameList;
   67 
   68 struct AttrInfo;
   69 typedef std::map<std::string, AttrInfo*> AttrMap;
   70 
   71 class ImmSearchOp;
   72 
   73 typedef std::vector<SaUint32T> ConnVector;
   74 typedef std::vector<unsigned int> NodeIdVector;
   75 typedef std::vector<std::string> ObjectNameVector;
   76 typedef std::vector<std::string> ImplNameVector;
   77 typedef std::vector<SaUint32T> IdVector;
   78 typedef std::map<std::string, ObjectInfo*> ObjectMap;
   79 typedef std::vector<SaInvocationT> InvocVector;
   80 
   81 /* Maps an object pointer, to a set of object pointers.*/
   82 typedef std::multimap<ObjectInfo*, ObjectInfo*> ObjectMMap;
   83 
   84 /**/
   85 typedef std::map<ObjectInfo*, uint16_t> ObjectShortCountMap;
   86 
   87 /* Object mutation */
   88 struct ObjectMutation;
   89 typedef std::map<std::string, ObjectMutation*> ObjectMutationMap;
   90 
   91 typedef std::set<std::string> ObjectNameSet;
   92 
   93 struct ImmOiImplementerClear;
   94 
   95 class ImmModel {
   96  public:
   97   ImmModel();
   98   static ImmModel* instance(void** sInstancep);
   99   // Classes
  100 
  101   SaAisErrorT classCreate(const ImmsvOmClassDescr* req, SaUint32T reqConn,
  102                           SaUint32T nodeId, SaUint32T* continuationId,
  103                           SaUint32T* pbeConn, unsigned int* pbeNodeId);
  104 
  105   bool nocaseCompare(const std::string& s1, const std::string& s2) const;
  106   const char* authorizedGroup();
  107   OsafImmAccessControlModeT accessControlMode();
  108   bool schemaChangeAllowed();
  109   bool protocol41Allowed();
  110   bool protocol43Allowed();
  111   bool protocol45Allowed();
  112   bool protocol46Allowed();
  113   bool protocol47Allowed();
  114   bool protocol50Allowed();
  115   bool protocol51Allowed();
  116   bool protocol51710Allowed();
  117   bool protocol51906Allowed();
  118   bool oneSafe2PBEAllowed();
  119   bool purgeSyncRequest(SaUint32T clientId);
  120   bool verifySchemaChange(const std::string& className, ClassInfo* oldClass,
  121                           ClassInfo* newClass, AttrMap& newAttrs,
  122                           AttrMap& changedAttrs);
  123 
  124   bool notCompatibleAtt(const std::string& className, ClassInfo* newClass,
  125                         const std::string& attName, const AttrInfo* oldAttr,
  126                         AttrInfo* newAttr, AttrMap* changedAttrs);
  127 
  128   void migrateObj(ObjectInfo* object, std::string className, AttrMap& newAttrs,
  129                   AttrMap& changedAttrs);
  130 
  131   SaAisErrorT classDelete(const ImmsvOmClassDescr* req, SaUint32T reqConn,
  132                           SaUint32T nodeId, SaUint32T* continuationId,
  133                           SaUint32T* pbeConn, unsigned int* pbeNodeId);
  134 
  135   SaAisErrorT classDescriptionGet(const immsv_octet_string* clName,
  136                                   ImmsvOmClassDescr* res);
  137 
  138   SaAisErrorT attrCreate(ClassInfo* classInfo, const ImmsvAttrDefinition* attr,
  139                          const std::string& attrName);
  140 
  141   // Admin ownership
  142 
  143   SaAisErrorT adminOwnerCreate(const ImmsvOmAdminOwnerInitialize* req,
  144                                SaUint32T ownerId, SaUint32T conn,
  145                                unsigned int nodeId);
  146 
  147   SaAisErrorT adminOwnerDelete(SaUint32T ownerId, bool hard, bool pbe2 = false);
  148 
  149   SaAisErrorT adminOwnerChange(const immsv_a2nd_admown_set* req,
  150                                bool release = false);
  151 
  152   // CCB
  153   SaAisErrorT ccbCreate(SaUint32T adminOwnerId, SaUint32T ccbFlags,
  154                         SaUint32T ccbId, unsigned int originatingNode,
  155                         SaUint32T originatingConn);
  156 
  157   SaAisErrorT ccbApply(SaUint32T ccbId, SaUint32T reqConn,
  158                        ConnVector& connVector, IdVector& implIds,
  159                        IdVector& continuations, bool validateOnly);
  160 
  161   SaAisErrorT ccbTerminate(SaUint32T ccbId);
  162 
  163   SaAisErrorT ccbAugmentInit(immsv_oi_ccb_upcall_rsp* rsp,
  164                              SaUint32T originatingNode,
  165                              SaUint32T originatingConn,
  166                              SaUint32T* adminOwnerId);
  167 
  168   void ccbAugmentAdmo(SaUint32T adminOwnerid, SaUint32T ccbId);
  169 
  170   SaAisErrorT ccbObjectCreate(ImmsvOmCcbObjectCreate* req, SaUint32T* implConn,
  171                               unsigned int* implNodeId,
  172                               SaUint32T* continuationId, SaUint32T* pbeConn,
  173                               unsigned int* pbeNodeId, std::string& objectName,
  174                               bool* dnOrRdnIsLong, bool isObjectDnUsed);
  175 
  176   immsv_attr_values_list* specialApplierTrimCreate(SaUint32T clientId,
  177                                                    ImmsvOmCcbObjectCreate* req);
  178 
  179   void specialApplierSavePrtoCreateAttrs(ImmsvOmCcbObjectCreate* req,
  180                                          SaUint32T continuationId);
  181 
  182   void specialApplierSaveRtUpdateAttrs(ImmsvOmCcbObjectModify* req,
  183                                        SaUint32T continuationId);
  184 
  185   immsv_attr_mods_list* specialApplierTrimModify(SaUint32T clientId,
  186                                                  ImmsvOmCcbObjectModify* req);
  187 
  188   bool isSpecialAndAddModify(SaUint32T clientId, SaUint32T ccbId);
  189   void genSpecialModify(ImmsvOmCcbObjectModify* req);
  190 
  191   void getLocalAppliersForObj(const SaNameT* objName, SaUint32T ccbId,
  192                               ConnVector& connVector, bool externalRep);
  193 
  194   void getLocalAppliersForCcb(SaUint32T ccbId, ConnVector& connVector,
  195                               SaUint32T* appCtnPtr);
  196 
  197   SaUint32T getPbeApplierConn();
  198 
  199   immsv_attr_mods_list* canonicalizeAttrModification(
  200       const struct ImmsvOmCcbObjectModify* req);
  201 
  202   immsv_attr_mods_list* getAllWritableAttributes(
  203       const ImmsvOmCcbObjectModify* req, bool* hasLongDn);
  204 
  205   SaAisErrorT ccbObjectModify(const ImmsvOmCcbObjectModify* req,
  206                               SaUint32T* implConn, unsigned int* implNodeId,
  207                               SaUint32T* continuationId, SaUint32T* pbeConn,
  208                               unsigned int* pbeNodeId, std::string& objectName,
  209                               bool* hasLongDns, bool pbeFile, bool* changeRim,
  210                               bool* changeSyncr);
  211 
  212   SaAisErrorT ccbObjectDelete(const ImmsvOmCcbObjectDelete* req,
  213                               SaUint32T reqConn,
  214                               ObjectNameVector& objNameVector,
  215                               ConnVector& connVector, IdVector& continuations,
  216                               SaUint32T* pbeConn, unsigned int* pbeNodeId,
  217                               bool* augDelete, bool* hasLongDn);
  218 
  219   SaAisErrorT deleteObject(ObjectMap::iterator& oi, SaUint32T reqConn,
  220                            AdminOwnerInfo* adminOwner, CcbInfo* ccb, bool doIt,
  221                            ObjectNameVector& objNameVector,
  222                            ConnVector& connVector, IdVector& continuations,
  223                            unsigned int pbeIsLocal,
  224                            ObjectInfo** readLockedObject,
  225                            bool sendToPbe);
  226 
  227   void setCcbErrorString(CcbInfo* ccb, const char* errorString, va_list vl);
  228 
  229   void setCcbErrorString(CcbInfo* ccb, const char* errorString, ...);
  230 
  231   bool hasLocalClassAppliers(ClassInfo* classInfo);
  232   bool hasLocalObjAppliers(const std::string& objName);
  233 
  234   bool ccbWaitForDeleteImplAck(SaUint32T ccbId, SaAisErrorT* err,
  235                                bool augDelete);
  236 
  237   bool ccbWaitForCompletedAck(SaUint32T ccbId, SaAisErrorT* err,
  238                               SaUint32T* pbeConn, unsigned int* pbeNodeId,
  239                               SaUint32T* pbeId, SaUint32T* pbeCtn,
  240                               bool mPbeDisableCritical);
  241 
  242   void ccbObjDelContinuation(immsv_oi_ccb_upcall_rsp* rsp, SaUint32T* reqConn,
  243                              bool* augDelete);
  244 
  245   void ccbCompletedContinuation(immsv_oi_ccb_upcall_rsp* rsp,
  246                                 SaUint32T* reqConn);
  247 
  248   void ccbObjCreateContinuation(SaUint32T ccbId, SaUint32T invocation,
  249                                 SaAisErrorT err, SaUint32T* reqConn);
  250 
  251   void ccbObjModifyContinuation(SaUint32T ccbId, SaUint32T invocation,
  252                                 SaAisErrorT err, SaUint32T* reqConn);
  253 
  254   void pbePrtObjCreateContinuation(SaUint32T invocation, SaAisErrorT error,
  255                                    unsigned int nodeId, SaUint32T* reqConn,
  256                                    SaUint32T* spApplConn,
  257                                    struct ImmsvOmCcbObjectCreate* req);
  258 
  259   int pbePrtObjDeletesContinuation(SaUint32T invocation, SaAisErrorT error,
  260                                    unsigned int nodeId, SaUint32T* reqConn,
  261                                    ObjectNameVector& objNameVector,
  262                                    SaUint32T* spApplConnPtr,
  263                                    SaUint32T* pbe2BConn);
  264 
  265   void pbePrtAttrUpdateContinuation(SaUint32T invocation, SaAisErrorT error,
  266                                     unsigned int nodeId, SaUint32T* reqConn,
  267                                     SaUint32T* spApplConnPtr,
  268                                     struct ImmsvOmCcbObjectModify* req);
  269 
  270   void pbeClassCreateContinuation(SaUint32T invocation, unsigned int nodeId,
  271                                   SaUint32T* reqConn);
  272 
  273   void pbeClassDeleteContinuation(SaUint32T invocation, unsigned int nodeId,
  274                                   SaUint32T* reqConn);
  275 
  276   void pbeUpdateEpochContinuation(SaUint32T invocation, unsigned int nodeId);
  277 
  278   // Administrative operations
  279   SaAisErrorT adminOperationInvoke(const ImmsvOmAdminOperationInvoke* req,
  280                                    SaUint32T reqConn, SaUint64T reply_dest,
  281                                    SaInvocationT& inv, SaUint32T* implConn,
  282                                    unsigned int* implNodeId, bool pbeExpected,
  283                                    bool* displayRes, bool isAtCoord);
  284 
  285   // Objects
  286 
  287   SaAisErrorT searchInitialize(ImmsvOmSearchInit* req, ImmSearchOp& op);
  288 
  289   SaAisErrorT nextSyncResult(ImmsvOmRspSearchNext** rsp, ImmSearchOp& op);
  290 
  291   SaAisErrorT objectIsLockedByCcb(const ImmsvOmSearchInit* req);
  292 
  293   SaAisErrorT ccbReadLockObject(const ImmsvOmSearchInit* req);
  294 
  295   SaAisErrorT accessorGet(const ImmsvOmSearchInit* req, ImmSearchOp& op);
  296 
  297   bool filterMatch(ObjectInfo* obj, ImmsvOmSearchOneAttr* filter,
  298                    SaAisErrorT& err, const char* objName);
  299 
  300   // Implementer API
  301   SaAisErrorT implementerSet(const immsv_octet_string* implName, SaUint32T con,
  302                              SaUint32T nodeId, SaUint32T ownerId,
  303                              SaUint64T mds_dest, SaUint32T implTimeout,
  304                              bool* discardImplementer);
  305 
  306   SaAisErrorT classImplementerSet(const struct ImmsvOiImplSetReq* req,
  307                                   SaUint32T con, unsigned int nodeId,
  308                                   SaUint32T* ccbId);
  309 
  310   SaAisErrorT classImplementerRelease(const struct ImmsvOiImplSetReq* req,
  311                                       SaUint32T con, unsigned int nodeId);
  312 
  313   SaAisErrorT objectImplementerSet(const struct ImmsvOiImplSetReq* req,
  314                                    SaUint32T con, unsigned int nodeId,
  315                                    SaUint32T* ccbId);
  316 
  317   SaAisErrorT objectImplementerRelease(const struct ImmsvOiImplSetReq* req,
  318                                        SaUint32T con, unsigned int nodeId);
  319 
  320   void clearImplName(ObjectInfo* obj);
  321 
  322   void implementerDelete(const char *implementerName);
  323 
  324   SaAisErrorT implementerClear(const struct ImmsvOiImplSetReq* req,
  325                                SaUint32T con, unsigned int nodeId, IdVector& gv,
  326                                bool isAtCoord);
  327 
  328   SaAisErrorT rtObjectCreate(struct ImmsvOmCcbObjectCreate* req, SaUint32T conn,
  329                              unsigned int nodeId, SaUint32T* continuationId,
  330                              SaUint32T* pbeConn, unsigned int* pbeNodeId,
  331                              SaUint32T* spApplConn, SaUint32T* pbe2BConn,
  332                              bool isObjectDnUsed);
  333 
  334   SaAisErrorT rtObjectUpdate(
  335       const ImmsvOmCcbObjectModify* req,  // re-used struct
  336       SaUint32T conn, unsigned int nodeId, bool* isPureLocal,
  337       SaUint32T* continuationId, SaUint32T* pbeConn, unsigned int* pbeNodeId,
  338       SaUint32T* specialApplCon, SaUint32T* pbe2BConn);
  339 
  340   void deferRtUpdate(ImmsvOmCcbObjectModify* req, SaUint64T msgNo);
  341 
  342   SaAisErrorT rtObjectDelete(
  343       const ImmsvOmCcbObjectDelete* req,  // re-used struct
  344       SaUint32T conn, unsigned int nodeId, SaUint32T* continuationId,
  345       SaUint32T* pbeConnPtr, unsigned int* pbeNodeIdPtr,
  346       ObjectNameVector& objNameVector, SaUint32T* specialApplCon,
  347       SaUint32T* pbe2BConn);
  348 
  349   SaAisErrorT deleteRtObject(ObjectMap::iterator& oi, bool doIt,
  350                              ImplementerInfo* info, bool& subTreeHasPersistent,
  351                              bool& subTreeHasSpecialAppl);
  352 
  353   SaAisErrorT resourceDisplay(const struct ImmsvAdminOperationParam* reqparams,
  354                               struct ImmsvAdminOperationParam** rparams,
  355                               SaUint64T searchcount);
  356 
  357   void setScAbsenceAllowed(SaUint32T scAbsenceAllowed);
  358 
  359   SaAisErrorT objectSync(const ImmsvOmObjectSync* req);
  360   bool fetchRtUpdate(ImmsvOmObjectSync* syncReq, ImmsvOmCcbObjectModify* modReq,
  361                      SaUint64T syncFevsBase);
  362 
  363   SaAisErrorT finalizeSync(ImmsvOmFinalizeSync* req, bool isCoord,
  364                            bool isSyncClient, SaUint32T* latestCcbId);
  365 
  366   void eduAtValToOs(immsv_octet_string* tmpos, immsv_edu_attr_val* v,
  367                     SaImmValueTypeT t);
  368 
  369   void getObjectName(ObjectInfo* obj, std::string& name);
  370 
  371   void getParentDn(std::string& parentName, const std::string& objectName);
  372   void setLoader(int pid);
  373   int getLoader();
  374   int adjustEpoch(int suggestedEpoch, SaUint32T* continuationId,
  375                   SaUint32T* pbeConnPtr, unsigned int* pbeNodeIdPtr,
  376                   bool increment);
  377   bool getRegenerateDbFlag();
  378   void setRegenerateDbFlag(bool value);
  379   SaImmRepositoryInitModeT getRepositoryInitMode();
  380   unsigned int getMaxSyncBatchSize();
  381   SaTimeT getSyncrTimeout();
  382   bool getLongDnsAllowed(ObjectInfo* immObject = NULL);
  383   void prepareForLoading();
  384   bool readyForLoading();
  385   void prepareForSync(bool isJoining);
  386   void recognizedIsolated();
  387   bool syncComplete(bool isJoining);
  388   void abortSync();
  389   void isolateThisNode(unsigned int thisNode, bool isAtCoord);
  390   void pbePrtoPurgeMutations(unsigned int nodeId, ConnVector& connVector);
  391   SaAisErrorT ccbResult(SaUint32T ccbId);
  392   ImmsvAttrNameList* ccbGrabErrStrings(SaUint32T ccbId);
  393   bool ccbsTerminated(bool allowEmpty);
  394   bool pbeIsInSync(bool checkCriticalCcbs);
  395   SaUint32T getIdForLargeAdmo();
  396   void getNonCriticalCcbs(IdVector& cv);
  397   void getOldCriticalCcbs(IdVector& cv, SaUint32T* pbeConn,
  398                           unsigned int* pbeNodeId, SaUint32T* pbeId);
  399   void sendSyncAbortAt(timespec& time);
  400   void getSyncAbortRsp();
  401   bool immNotWritable();
  402   bool immNotPbeWritable(bool isPrtoClient = true);
  403   void* getPbeOi(SaUint32T* pbeConn, unsigned int* pbeNode,
  404                  bool fevsSafe = true);
  405   void* getPbeBSlave(SaUint32T* pbeConn, unsigned int* pbeNode,
  406                      bool fevsSafe = true);
  407   bool pbeBSlaveHasExisted();
  408   ImplementerInfo* getSpecialApplier();
  409   bool specialApplyForClass(ClassInfo* classInfo);
  410   SaUint32T findConnForImplementerOfObject(std::string objectDn);
  411   ImplementerInfo* findImplementer(SaUint32T);
  412   ImplementerInfo* findImplementer(const std::string&);
  413   SaUint32T getImplementerId(SaUint32T localConn);
  414   void discardImplementer(unsigned int implHandle, bool reallyDiscard,
  415                           IdVector& gv, bool isAtCoord);
  416   void discardContinuations(SaUint32T dead);
  417   void discardNode(unsigned int nodeId, IdVector& cv, IdVector& gv,
  418                    bool isAtCoord, bool scAbsence);
  419   void getCcbIdsForOrigCon(SaUint32T dead, IdVector& cv);
  420   void getAdminOwnerIdsForCon(SaUint32T dead, IdVector& cv);
  421   bool ccbCommit(SaUint32T ccbId, ConnVector& connVector);
  422   bool ccbAbort(SaUint32T ccbId, ConnVector& connVector,
  423                 ConnVector& clientVector, SaUint32T* nodeId,
  424                 unsigned int* pbeNodeIdPtr);
  425   SaUint32T cleanTheBasement(InvocVector& admReqs, InvocVector& searchReqs,
  426                              IdVector& ccbs, IdVector& pbePrtoReqs,
  427                              ImplNameVector& appliers, bool iAmCoord);
  428 
  429   void fetchAdmImplContinuation(SaInvocationT& inv,
  430                                 SaUint32T* implConn,     // in-out!
  431                                 SaUint64T* reply_dest);  // out
  432   void fetchAdmReqContinuation(SaInvocationT& inv,
  433                                SaUint32T* reqConn);  // in-out?
  434   void fetchSearchReqContinuation(SaInvocationT& inv,
  435                                   SaUint32T* reqConn);  // in-out?
  436   void setSearchReqContinuation(SaInvocationT& inv, SaUint32T conn,
  437                                 SaUint32T implTimeout);
  438 
  439   void setAdmReqContinuation(SaInvocationT& inv, SaUint32T conn);
  440 
  441   void fetchSearchImplContinuation(SaInvocationT& inv,
  442                                    SaUint64T* reply_dest);  // out
  443   void setSearchImplContinuation(SaInvocationT& inv, SaUint64T reply_dest);
  444 
  445   void fetchCcbObjDelImplContinuation(SaInvocationT& inv, SaUint32T* implConn,
  446                                       SaUint64T* reply_dest);
  447   /*
  448     void              setCcbCompletedImplContinuation(
  449                                                       SaInvocationT& inv,
  450                                                       SaUint32T conn,
  451                                                       SaUint64T reply_dest);
  452     void              fetchCcbCompletedContinuation(
  453                                                     SaInvocationT& inv,
  454                                                     SaUint32T* implConn,
  455                                                     SaUint64T* reply_dest);
  456   */
  457 
  458   void setCcbObjCreateImplContinuation(SaInvocationT& inv, SaUint32T conn,
  459                                        SaUint64T reply_dest);
  460   void setCcbObjDelImplContinuation(SaInvocationT& inv, SaUint32T conn,
  461                                     SaUint64T reply_dest);
  462   void fetchCcbObjCreateImplContinuation(SaInvocationT& inv,
  463                                          SaUint32T* implConn,     // in-out!
  464                                          SaUint64T* reply_dest);  // out
  465   void setCcbObjModifyImplContinuation(SaInvocationT& inv, SaUint32T conn);
  466   void fetchCcbObjModifyImplContinuation(SaInvocationT& inv,
  467                                          SaUint32T* implConn);  // in-out!
  468 
  469   SaUint32T fetchSearchReqContinuation(SaInvocationT& inv);
  470 
  471   SaAisErrorT setOneObjectImplementer(std::string objectName, ObjectInfo* obj,
  472                                       ImplementerInfo* info, bool doIt,
  473                                       SaUint32T* ccbId);
  474 
  475   SaAisErrorT releaseImplementer(std::string objectName, ObjectInfo* obj,
  476                                  ImplementerInfo* info, bool doIt);
  477 
  478   SaAisErrorT adminOwnerSet(std::string objectName, ObjectInfo* obj,
  479                             AdminOwnerInfo* adm, bool doIt);
  480 
  481   SaAisErrorT adminOwnerRelease(std::string objectName, ObjectInfo* obj,
  482                                 AdminOwnerInfo* adm, bool doIt);
  483   SaAisErrorT verifyImmLimits(ObjectInfo* object, std::string objectName);
  484 
  485   void getLocalImplementers(ConnVector& cv, IdVector& idv);
  486 
  487  private:
  488   bool checkSubLevel(const std::string& objectName, size_t rootStart);
  489 
  490   bool nameCheck(const std::string& name, bool strict = true) const;
  491   bool schemaNameCheck(const std::string& name) const;
  492   bool nameToInternal(std::string& name);
  493   void nameToExternal(std::string& name);
  494 
  495   void updateImmObject(std::string newClassName, bool remove = false);
  496   SaAisErrorT updateImmObject2(const ImmsvOmAdminOperationInvoke* req);
  497   SaAisErrorT admoImmMngtObject(const ImmsvOmAdminOperationInvoke* req,
  498                                 bool isAtCoord);
  499 
  500   void addNoDanglingRefs(ObjectInfo* obj);
  501   void removeNoDanglingRefs(ObjectInfo* object, ObjectInfo* afim,
  502                             bool removeRefsToObject = false);
  503   void addNewNoDanglingRefs(ObjectInfo* obj, ObjectNameSet& dnSet);
  504   void removeNoDanglingRefSet(ObjectInfo* obj, ObjectNameSet& dnSet);
  505 
  506   void commitCreate(ObjectInfo* afim);
  507   bool commitModify(const std::string& dn, ObjectInfo* afim);
  508   void commitDelete(const std::string& dn);
  509 
  510   int loaderPid;  //(-1) => loading not started or loading partiticpant.
  511                   // >0  => loading in progress here at coordinator.
  512                   //  0  => loading completed at coordinator and participants.
  513 
  514   bool validateNoDanglingRefsModify(CcbInfo* ccb,
  515                                     ObjectMutationMap::iterator& omit);
  516   bool validateNoDanglingRefsDelete(CcbInfo* ccb,
  517                                     ObjectMutationMap::iterator& omit);
  518   bool validateNoDanglingRefs(CcbInfo* ccb);
  519 
  520   void collectNoDanglingRefs(ObjectInfo* object, ObjectNameSet& objSet);
  521 
  522   SaAisErrorT objectModifyNDTargetOk(const char* srcObjectName,
  523                                      const char* attrName,
  524                                      const char* targetObjectName,
  525                                      SaUint32T ccbId);
  526 
  527   bool noDanglingRefExist(ObjectInfo* obj, const char* noDanglingRef);
  528 
  529   ObjectInfo* getObjectAfterImageInCcb(const std::string& objName,
  530                                        SaUint32T ccbId);
  531 
  532   immsv_attr_mods_list* attrValueToAttrMod(const ObjectInfo* obj,
  533                                            const std::string& attrName,
  534                                            SaUint32T attrType,
  535                                            SaImmAttrFlagsT attrFlags = 0,
  536                                            bool* hasLongDn = NULL);
  537 };
  538 
  539 #endif  // IMM_IMMND_IMMMODEL_H_