Package com.arjuna.ats.arjuna.objectstore

Examples of com.arjuna.ats.arjuna.objectstore.ObjectStore


/*      */         }
/*      */       }
/*      */
/* 1283 */       if (osObjName == null)
/*      */       {
/* 1285 */         this.objectStore = new ObjectStore(this.smAttributes.objectStoreType, this.storeRoot, sharedStatus);
/*      */       }
/*      */       else
/*      */       {
/* 1289 */         this.objectStore = new ObjectStore(this.smAttributes.objectStoreType, osObjName);
/*      */       }
/*      */
/*      */     }
/*      */     else
/*      */     {
View Full Code Here


/*  77 */     if (baType.charAt(0) == '/')
/*  78 */       baType = baType.substring(1);
/*     */     try
/*     */     {
/*  81 */       TxControl txc = new TxControl();
/*  82 */       ObjectStore imple = TxControl.getStore();
/*     */
/*  84 */       InputObjectState types = new InputObjectState();
/*     */
/*  86 */       if (imple.allTypes(types))
/*     */       {
/*  88 */         String theName = null;
/*  89 */         int count = 0;
/*     */         try
/*     */         {
/*  93 */           boolean endOfList = false;
/*     */
/*  95 */           while (!endOfList)
/*     */           {
/*  97 */             theName = types.unpackString();
/*     */
/*  99 */             if (theName.compareTo("") == 0) {
/* 100 */               endOfList = true; continue;
/* 101 */             }if (!theName.startsWith(baType))
/*     */               continue;
/* 103 */             count++;
/*     */
/* 105 */             System.out.println(count + ": " + theName);
/*     */
/* 107 */             InputObjectState uids = new InputObjectState();
/*     */
/* 109 */             if (imple.allObjUids(theName, uids))
/*     */             {
/* 111 */               Uid theUid = new Uid(Uid.nullUid());
/*     */               try
/*     */               {
/* 115 */                 boolean endOfUids = false;
/*     */
/* 117 */                 while (!endOfUids)
/*     */                 {
/* 119 */                   theUid.unpack(uids);
/*     */
/* 121 */                   if (theUid.equals(Uid.nullUid())) {
/* 122 */                     endOfUids = true; continue;
/*     */                   }
/*     */
/* 125 */                   System.out.print("\t" + theUid + " state is ");
/* 126 */                   System.out.print(ObjectStore.stateStatusString(imple.currentState(theUid, theName)));
/* 127 */                   System.out.println();
/*     */                 }
/*     */
/*     */               }
/*     */               catch (Exception e)
View Full Code Here

/*     */
/*     */     }
/*     */
/*     */     try
/*     */     {
/*  84 */       ObjectStore imple = null;
/*     */
/*  86 */       if (storeImple != null)
/*  87 */         imple = new ObjectStore(new ClassName(storeImple), root);
/*     */       else {
/*  89 */         imple = new ObjectStore(root);
/*     */       }
/*  91 */       InputObjectState types = new InputObjectState();
/*     */
/*  93 */       if (imple.allTypes(types))
/*     */       {
/*  95 */         String theName = null;
/*  96 */         int count = 0;
/*     */         try
/*     */         {
/* 100 */           boolean endOfList = false;
/*     */
/* 102 */           while (!endOfList)
/*     */           {
/* 104 */             theName = types.unpackString();
/*     */
/* 106 */             if (theName.compareTo("") == 0) {
/* 107 */               endOfList = true; continue;
/*     */             }
/*     */
/* 110 */             count++;
/*     */
/* 112 */             System.out.println(count + ": " + theName);
/*     */
/* 114 */             InputObjectState uids = new InputObjectState();
/*     */
/* 116 */             if (imple.allObjUids(theName, uids))
/*     */             {
/* 118 */               Uid theUid = new Uid(Uid.nullUid());
/*     */               try
/*     */               {
/* 122 */                 boolean endOfUids = false;
/*     */
/* 124 */                 while (!endOfUids)
/*     */                 {
/* 126 */                   theUid.unpack(uids);
/*     */
/* 128 */                   if (theUid.equals(Uid.nullUid())) {
/* 129 */                     endOfUids = true; continue;
/*     */                   }
/*     */
/* 132 */                   System.out.print("\t" + theUid + " state is ");
/* 133 */                   System.out.print(ObjectStore.stateStatusString(imple.currentState(theUid, theName)));
/*     */
/* 135 */                   System.out.println();
/*     */                 }
/*     */
/*     */               }
View Full Code Here

/* 214 */       DefaultTreeModel model = (DefaultTreeModel)transactions.getModel();
/*     */       try
/*     */       {
/* 218 */         ClassName actionStoreType = new ClassName(arjPropertyManager.propertyManager.getProperty("com.arjuna.ats.arjuna.coordinator.actionStore", ArjunaNames.Implementation_ObjectStore_defaultActionStore().stringForm()));
/*     */
/* 221 */         ObjectStore imple = new ObjectStore(actionStoreType, root);
/* 222 */         InputObjectState types = new InputObjectState();
/*     */
/* 224 */         startSweep();
/*     */
/* 226 */         if (imple.allTypes(types))
/*     */         {
/* 228 */           String fullPathName = null;
/* 229 */           boolean found = false;
/*     */           try
/*     */           {
/* 233 */             boolean endOfList = false;
/* 234 */             DefaultMutableTreeNode currentNode = null;
/* 235 */             DefaultMutableTreeNode currentRoot = top;
/*     */
/* 237 */             while (!endOfList)
/*     */             {
/* 239 */               fullPathName = types.unpackString();
/*     */
/* 241 */               if (fullPathName.compareTo("") == 0) {
/* 242 */                 endOfList = true;
/*     */               }
/*     */               else {
/* 245 */                 found = true;
/*     */
/* 247 */                 InputObjectState uids = new InputObjectState();
/* 248 */                 String nodeName = stripName(fullPathName);
/* 249 */                 boolean added = false;
/*     */
/* 251 */                 currentNode = findNode(fullPathName);
/*     */
/* 253 */                 if (currentNode == null)
/*     */                 {
/* 255 */                   currentNode = new DefaultMutableTreeNode(nodeName);
/* 256 */                   addDirectory(currentNode, fullPathName);
/* 257 */                   currentRoot.add(currentNode);
/*     */
/* 263 */                   int[] i = new int[1];
/*     */
/* 265 */                   i[0] = (currentRoot.getChildCount() - 1);
/*     */
/* 267 */                   model.nodesWereInserted(currentRoot, i);
/*     */
/* 269 */                   added = true;
/*     */                 }
/*     */
/* 272 */                 currentRoot = findRoot(top, currentNode);
/*     */
/* 274 */                 if (added) {
/* 275 */                   currentRoot.add(currentNode);
/*     */                 }
/* 277 */                 if (imple.allObjUids(fullPathName, uids))
/*     */                 {
/* 279 */                   Uid theUid = new Uid(Uid.nullUid());
/*     */                   try
/*     */                   {
/* 283 */                     boolean endOfUids = false;
/* 284 */                     boolean first = true;
/* 285 */                     boolean haveUids = false;
/*     */
/* 287 */                     while (!endOfUids)
/*     */                     {
/* 289 */                       theUid.unpack(uids);
/*     */
/* 291 */                       if (theUid.equals(Uid.nullUid()))
/*     */                       {
/* 293 */                         if (!haveUids)
/*     */                         {
/* 295 */                           if (emptyDirectory(currentNode))
/*     */                           {
/* 297 */                             currentNode.removeAllChildren();
/* 298 */                             model.nodeChanged(currentNode);
/*     */                           }
/*     */                         }
/*     */
/* 302 */                         endOfUids = true; continue;
/*     */                       }
/*     */
/* 306 */                       haveUids = true;
/*     */
/* 308 */                       if (first)
/*     */                       {
/* 310 */                         currentNode.removeAllChildren();
/*     */
/* 312 */                         first = false;
/*     */                       }
/*     */
/* 315 */                       DefaultMutableTreeNode tranID = new DefaultMutableTreeNode(theUid.stringForm());
/*     */
/* 317 */                       tranID.add(new DefaultMutableTreeNode(new String("status: " + statusToString(imple.currentState(theUid, fullPathName)))));
/*     */
/* 319 */                       currentNode.add(tranID);
/*     */
/* 321 */                       added = true;
/*     */                     }
View Full Code Here

/* 442 */     DefaultMutableTreeNode top = new DefaultMutableTreeNode(scanningNode);
/*     */     try
/*     */     {
/* 446 */       ClassName actionStoreType = new ClassName(arjPropertyManager.propertyManager.getProperty("com.arjuna.ats.arjuna.coordinator.actionStore", ArjunaNames.Implementation_ObjectStore_defaultActionStore().stringForm()));
/*     */
/* 449 */       ObjectStore imple = new ObjectStore(actionStoreType, root);
/* 450 */       InputObjectState types = new InputObjectState();
/*     */
/* 452 */       if (imple.allTypes(types))
/*     */       {
/* 454 */         String fullPathName = null;
/* 455 */         boolean found = false;
/*     */         try
/*     */         {
/* 459 */           boolean endOfList = false;
/* 460 */           DefaultMutableTreeNode currentNode = null;
/* 461 */           DefaultMutableTreeNode currentRoot = top;
/*     */
/* 463 */           topTran.add(currentRoot);
/*     */
/* 465 */           while (!endOfList)
/*     */           {
/* 467 */             fullPathName = types.unpackString();
/*     */
/* 469 */             if (fullPathName.compareTo("") == 0) {
/* 470 */               endOfList = true;
/*     */             }
/*     */             else {
/* 473 */               found = true;
/*     */
/* 475 */               InputObjectState uids = new InputObjectState();
/* 476 */               String nodeName = stripName(fullPathName);
/*     */
/* 478 */               currentNode = new DefaultMutableTreeNode(nodeName);
/* 479 */               addDirectory(currentNode, fullPathName);
/*     */
/* 481 */               currentRoot = findRoot(top, currentNode);
/* 482 */               currentRoot.add(currentNode);
/*     */
/* 484 */               if (imple.allObjUids(fullPathName, uids))
/*     */               {
/* 486 */                 Uid theUid = new Uid(Uid.nullUid());
/*     */                 try
/*     */                 {
/* 490 */                   boolean endOfUids = false;
/*     */
/* 492 */                   while (!endOfUids)
/*     */                   {
/* 494 */                     theUid.unpack(uids);
/*     */
/* 496 */                     if (theUid.equals(Uid.nullUid())) {
/* 497 */                       endOfUids = true; continue;
/*     */                     }
/*     */
/* 500 */                     DefaultMutableTreeNode tranID = new DefaultMutableTreeNode(theUid.stringForm());
/*     */
/* 502 */                     tranID.add(new DefaultMutableTreeNode(new String("status: " + statusToString(imple.currentState(theUid, fullPathName)))));
/*     */
/* 504 */                     currentNode.add(tranID);
/*     */                   }
/*     */
/*     */                 }
View Full Code Here

/*  690 */       tsLogger.arjLogger.debug(16L, 4L, 1L, "BasicAction::activate() for action-id " + get_uid());
/*      */     }
/*      */
/*  694 */     boolean restored = false;
/*      */
/*  697 */     ObjectStore aaStore = store();
/*      */
/*  699 */     if (aaStore == null) {
/*  700 */       return false;
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  706 */       InputObjectState oState = aaStore.read_committed(getSavingUid(), type());
/*      */
/*  708 */       if (oState != null)
/*      */       {
/*  710 */         synchronized (this)
/*      */         {
View Full Code Here

/*  754 */       tsLogger.arjLogger.debug(16L, 4L, 1L, "BasicAction::deactivate() for action-id " + get_uid());
/*      */     }
/*      */
/*  758 */     boolean deactivated = false;
/*      */
/*  761 */     ObjectStore aaStore = store();
/*      */
/*  763 */     if (aaStore == null) {
/*  764 */       return false;
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  769 */       OutputObjectState oState = new OutputObjectState();
/*      */
/*  771 */       if (save_state(oState, 1))
/*      */       {
/*  773 */         if (aaStore.write_committed(getSavingUid(), type(), oState))
/*      */         {
/*  775 */           deactivated = true;
/*      */         }
/*      */         else
/*      */         {
View Full Code Here

/*  77 */     if (txojLogger.aitLoggerI18N.isDebugEnabled())
/*     */     {
/*  79 */       txojLogger.aitLoggerI18N.debug(1L, 4L, 2048L, "com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_1");
/*     */     }
/*     */
/*  88 */     _objectStore = new ObjectStore(13);
/*     */   }
View Full Code Here

/* 101 */     if (txojLogger.aitLoggerI18N.isDebugEnabled())
/*     */     {
/* 103 */       txojLogger.aitLoggerI18N.debug(1L, 4L, 2048L, "com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_2", new Object[] { objName });
/*     */     }
/*     */
/* 109 */     _objectStore = new ObjectStore(objName);
/*     */   }
View Full Code Here

/*  84 */       Configuration.setLockStoreRoot(lockStoreLocation);
/*     */     }
/*     */
/*  87 */     this._key = lockStoreLocation;
/*     */
/*  95 */     this._lockStore = new ObjectStore(ArjunaNames.Implementation_ObjectStore_ShadowingStore(), this._key);
/*     */   }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.objectstore.ObjectStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.