Examples of OutputObjectState


Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/* 1096 */           AbstractRecord record = null;
/* 1097 */           int rStatus = 2;
/*      */
/* 1099 */           if ((this.currentStatus == 3) || (this.currentStatus == 2))
/*      */           {
/* 1102 */             OutputObjectState state = null;
/*      */
/* 1104 */             if (tsLogger.arjLoggerI18N.isWarnEnabled())
/*      */             {
/* 1106 */               tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_11", new Object[] { this.objectUid, type() });
/*      */             }
/*      */
/* 1115 */             if (fromTerminate)
/*      */             {
/* 1117 */               state = new OutputObjectState(this.objectUid, type());
/*      */
/* 1119 */               if (!save_state(state, this.myType))
/*      */               {
/* 1121 */                 if (tsLogger.arjLoggerI18N.isWarnEnabled()) {
/* 1122 */                   tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_12");
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*     */     {
/* 258 */       tsLogger.arjLogger.debug(16L, 4L, 8L, "CadaverRecord::topLevelCommit() for " + order());
/*     */     }
/*     */
/* 262 */     boolean res = true;
/* 263 */     OutputObjectState oState = this.state;
/*     */
/* 265 */     if ((oState != null) && (this.oType == 111))
/*     */     {
/* 267 */       if (this.store == null) {
/* 268 */         return 8;
/*     */       }
/*     */       try
/*     */       {
/* 272 */         res = this.store.commit_state(oState.stateUid(), oState.type());
/*     */       }
/*     */       catch (ObjectStoreException e)
/*     */       {
/* 276 */         res = false;
/*     */       }
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*     */     {
/* 295 */       tsLogger.arjLogger.debug(16L, 4L, 8L, "CadaverRecord::topLevelPrepare() for " + order());
/*     */     }
/*     */
/* 299 */     int tlpOk = 1;
/* 300 */     OutputObjectState oState = this.newStateIsValid ? this.state : this.oldState;
/*     */
/* 302 */     if (oState != null)
/*     */     {
/* 304 */       if (this.oType == 111)
/*     */       {
/* 306 */         if (this.store == null) {
/* 307 */           return 1;
/*     */         }
/*     */         try
/*     */         {
/* 311 */           if (this.store.write_uncommitted(oState.stateUid(), oState.type(), oState))
/*     */           {
/* 313 */             if (shadowForced())
/* 314 */               tlpOk = 0;
/*     */           }
/*     */         }
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/* 409 */         setValue(this.oldState);
/* 410 */         this.newStateIsValid = true;
/*     */       }
/*     */     }
/*     */
/* 414 */     this.oldState = new OutputObjectState((OutputObjectState)(OutputObjectState)mergewith.value());
/*     */   }
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*  764 */       return false;
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  769 */       OutputObjectState oState = new OutputObjectState();
/*      */
/*  771 */       if (save_state(oState, 1))
/*      */       {
/*  773 */         if (aaStore.write_committed(getSavingUid(), type(), oState))
/*      */         {
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*      */
/* 2531 */     if ((this.actionType == 0) && (stateToSave) && ((this.preparedList.size() > 0) || (this.heuristicList.size() > 0)))
/*      */     {
/* 2536 */       Uid u = getSavingUid();
/* 2537 */       String tn = type();
/* 2538 */       OutputObjectState state = new OutputObjectState(u, tn);
/*      */
/* 2540 */       if (!save_state(state, 1))
/*      */       {
/* 2542 */         if (tsLogger.arjLoggerI18N.isWarnEnabled())
/*      */         {
/* 2544 */           tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.coordinator.BasicAction_45", new Object[] { get_uid() });
/*      */         }
/*      */
/* 2548 */         criticalEnd();
/*      */
/* 2550 */         return 1;
/*      */       }
/*      */
/* 2553 */       if (state.notempty())
/*      */       {
/*      */         try
/*      */         {
/* 2557 */           if (!this.currentStore.write_committed(u, tn, state))
/*      */           {
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*      */
/* 3467 */       if (((this.failedList != null) && (this.failedList.size() > 0)) || ((this.heuristicList != null) && (this.heuristicList.size() > 0)))
/*      */       {
/* 3474 */         Uid u = getSavingUid();
/* 3475 */         String tn = type();
/* 3476 */         OutputObjectState state = new OutputObjectState(u, tn);
/*      */
/* 3478 */         if (!save_state(state, 1))
/*      */         {
/* 3480 */           tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.coordinator.BasicAction_64");
/*      */         }
/*      */
/* 3485 */         if (state.notempty())
/*      */         {
/*      */           try
/*      */           {
/* 3489 */             if (!this.currentStore.write_committed(u, tn, state))
/*      */             {
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*     */     {
/* 248 */       tsLogger.arjLogger.debug(16L, 4L, 16L, "FileSystemStore.allObjUids(" + tName + ", " + state + ", " + match + ")");
/*     */     }
/*     */
/* 253 */     String directory = null;
/* 254 */     OutputObjectState store = new OutputObjectState();
/*     */
/* 260 */     if ((tName != null) && (tName.charAt(0) == File.separatorChar))
/*     */     {
/* 262 */       String s = tName.substring(1, tName.length());
/* 263 */       directory = new String(this.fullStoreName + s);
/*     */     }
/*     */     else {
/* 266 */       directory = new String(this.fullStoreName + tName);
/*     */     }
/* 268 */     File f = new File(directory);
/* 269 */     String[] entry = f.list();
/*     */
/* 271 */     if ((entry != null) && (entry.length > 0))
/*     */     {
/* 273 */       for (int i = 0; i < entry.length; i++)
/*     */       {
/*     */         try
/*     */         {
/* 277 */           Uid aUid = new Uid(entry[i], true);
/*     */
/* 279 */           if ((!aUid.valid()) || (aUid.equals(Uid.nullUid())))
/*     */           {
/* 281 */             String revealed = revealedId(entry[i]);
/*     */
/* 285 */             if (present(revealed, entry))
/* 286 */               aUid = null;
/*     */             else {
/* 288 */               aUid = new Uid(revealed);
/*     */             }
/*     */           }
/* 291 */           if ((aUid != null) && (aUid.valid()))
/*     */           {
/* 293 */             if ((aUid.notEquals(Uid.nullUid())) && ((match == 0) || (isType(aUid, tName, match))))
/*     */             {
/* 296 */               aUid.pack(store);
/*     */             }
/*     */
/*     */           }
/*     */
/*     */         }
/*     */         catch (NumberFormatException e)
/*     */         {
/*     */         }
/*     */         catch (IOException e)
/*     */         {
/* 308 */           throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_2a"));
/*     */         }
/*     */       }
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 315 */       Uid.nullUid().pack(store);
/*     */     }
/*     */     catch (IOException e)
/*     */     {
/* 319 */       throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_3"));
/*     */     }
/*     */
/* 322 */     state.setBuffer(store.buffer());
/*     */
/* 324 */     store = null;
/*     */
/* 326 */     return true;
/*     */   }
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/* 340 */     String[] entry = f.list();
/*     */
/* 342 */     if (entry == null) {
/* 343 */       return true;
/*     */     }
/* 345 */     OutputObjectState store = new OutputObjectState();
/*     */
/* 347 */     for (int i = 0; i < entry.length; i++)
/*     */     {
/* 349 */       if (supressEntry(entry[i]))
/*     */         continue;
/* 351 */       File tmpFile = new File(directory + File.separator + entry[i]);
/*     */
/* 353 */       if (tmpFile.isDirectory())
/*     */       {
/*     */         try
/*     */         {
/* 357 */           store.packString(entry[i]);
/*     */
/* 359 */           result = allTypes(store, entry[i]);
/*     */         }
/*     */         catch (IOException e)
/*     */         {
/* 363 */           throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_4"));
/*     */         }
/*     */       }
/*     */
/* 367 */       tmpFile = null;
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 373 */       store.packString("");
/*     */     }
/*     */     catch (IOException e)
/*     */     {
/* 377 */       throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_5"));
/*     */     }
/*     */
/* 380 */     foundTypes.setBuffer(store.buffer());
/*     */
/* 382 */     return result;
/*     */   }
View Full Code Here

Examples of com.arjuna.ats.arjuna.state.OutputObjectState

/*     */     {
/* 158 */       tsLogger.arjLogger.debug(16L, 4L, 16L, "HashedStore.allObjUids(" + tName + ", " + state + ", " + match + ")");
/*     */     }
/*     */
/* 167 */     String directory = locateStore(getStoreName());
/* 168 */     OutputObjectState store = new OutputObjectState();
/*     */
/* 172 */     if ((tName != null) && (tName.charAt(0) == File.separatorChar))
/* 173 */       directory = directory + tName.substring(1, tName.length());
/*     */     else {
/* 175 */       directory = directory + tName;
/*     */     }
/* 177 */     if (!directory.endsWith(File.separator)) {
/* 178 */       directory = directory + File.separator;
/*     */     }
/* 180 */     File f = new File(directory);
/* 181 */     String[] entry = f.list();
/*     */
/* 183 */     if ((entry != null) && (entry.length > 0))
/*     */     {
/* 185 */       for (int i = 0; i < entry.length; i++)
/*     */       {
/* 187 */         if ((!Character.isDigit(entry[i].charAt(1))) && (!entry[i].startsWith("#")))
/*     */           continue;
/* 189 */         File dir = new File(directory + entry[i]);
/*     */
/* 191 */         if (!dir.isDirectory())
/*     */           continue;
/* 193 */         String[] dirEnt = dir.list();
/*     */
/* 195 */         for (int j = 0; j < dirEnt.length; j++)
/*     */         {
/*     */           try
/*     */           {
/* 199 */             Uid aUid = new Uid(dirEnt[j], true);
/*     */
/* 201 */             if ((!aUid.valid()) || (aUid.equals(Uid.nullUid())))
/*     */             {
/* 203 */               String revealed = revealedId(dirEnt[j]);
/*     */
/* 207 */               if (present(revealed, dirEnt))
/* 208 */                 aUid = null;
/*     */               else {
/* 210 */                 aUid = new Uid(revealed);
/*     */               }
/*     */             }
/* 213 */             if ((aUid.notEquals(Uid.nullUid())) && ((match == 0) || (isType(aUid, tName, match))))
/*     */             {
/* 216 */               aUid.pack(store);
/*     */             }
/*     */
/*     */           }
/*     */           catch (NumberFormatException e)
/*     */           {
/*     */           }
/*     */           catch (IOException e)
/*     */           {
/* 227 */             throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_5"));
/*     */           }
/*     */
/*     */         }
/*     */
/*     */       }
/*     */
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 243 */       Uid.nullUid().pack(store);
/*     */     }
/*     */     catch (IOException e)
/*     */     {
/* 247 */       throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_6"));
/*     */     }
/*     */
/* 250 */     state.setBuffer(store.buffer());
/*     */
/* 252 */     store = null;
/*     */
/* 254 */     return true;
/*     */   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.