Package com.arjuna.ats.arjuna.objectstore

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


        try
        {
            String actionStoreType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
            Class osImple = Class.forName(actionStoreType);
            ObjectStore imple = (ObjectStore) osImple.newInstance();

            InputObjectState types = new InputObjectState();

            if (imple.allTypes(types))
            {
                String fullPathName = null;
                boolean found = false;

                try
                {
                    boolean endOfList = false;
                    DefaultMutableTreeNode currentNode = null;
                    DefaultMutableTreeNode currentRoot = top;

                    topTran.add(currentRoot);

                    while (!endOfList)
                    {
                        fullPathName = types.unpackString();

                        if (fullPathName.compareTo("") == 0)
                            endOfList = true;
                        else
                        {
                            found = true;

                            InputObjectState uids = new InputObjectState();
                            String nodeName = stripName(fullPathName);

                            currentNode = new DefaultMutableTreeNode(nodeName);
                            addDirectory(currentNode, fullPathName);

                            currentRoot = findRoot(top, currentNode);
                            currentRoot.add(currentNode);

                            if (imple.allObjUids(fullPathName, uids))
                            {
                                Uid theUid = new Uid(Uid.nullUid());

                                try
                                {
                                    boolean endOfUids = false;

                                    while (!endOfUids)
                                    {
                                        theUid = UidHelper.unpackFrom(uids);

                                        if (theUid.equals(Uid.nullUid()))
                                            endOfUids = true;
                                        else
                                        {
                                            DefaultMutableTreeNode tranID = new DefaultMutableTreeNode(
                                                    theUid.stringForm());

                                            tranID
                                                    .add(new DefaultMutableTreeNode(
                                                            new String(
                                                                    "status: "
                                                                            + statusToString(imple
                                                                                    .currentState(
                                                                                            theUid,
                                                                                            fullPathName)))));

                                            currentNode.add(tranID);
View Full Code Here


        }

        try
        {
            Class osc = Class.forName(arjPropertyManager.getObjectStoreEnvironmentBean().getObjectStoreType());
            ObjectStore imple = (ObjectStore) osc.newInstance();

            System.out.println("Status is "
                    + imple.currentState(new Uid(uid), type));

            InputObjectState buff = new InputObjectState();

            imple.allObjUids(type, buff, ObjectStore.OS_UNCOMMITTED);

            Uid u = UidHelper.unpackFrom(buff);
           
            System.out.println("got "+u);
        }
View Full Code Here

        if (baType.charAt(0) == '/')
                baType = baType.substring(1);
        try
        {
            TxControl txc = new TxControl();
            ObjectStore imple = txc.getStore();

            InputObjectState types = new InputObjectState();

            if (imple.allTypes(types))
            {
                String theName = null;
                int count = 0;

                try
                {
                    boolean endOfList = false;

                    while (!endOfList)
                    {
                        theName = types.unpackString();

                        if (theName.compareTo("") == 0)
                            endOfList = true;
                        else if (theName.startsWith(baType))
                        {
                            count++;
           
                            System.out.println(count+": "+theName);

                            InputObjectState uids = new InputObjectState();

                            if (imple.allObjUids(theName, uids))
                            {
                                Uid theUid = new Uid(Uid.nullUid());

                                try
                                {
                                    boolean endOfUids = false;
                                   
                                    while (!endOfUids)
                                    {
                                        theUid = UidHelper.unpackFrom(uids);

                                        if (theUid.equals(Uid.nullUid()))
                                            endOfUids = true;
                                        else
                                        {
                                            System.out.print("\t"+theUid+" state is ");
                                            System.out.print(ObjectStore.stateStatusString(imple.currentState(theUid, theName)));
                                            System.out.println();
                                        }
                                    }
                                }
                                catch (Exception e)
View Full Code Here

        Xid[] indoubt = null;

        try
        {
            ObjectStore objStore = TxControl.getStore();
            InputObjectState states = new InputObjectState();

            // only look in the JCA section of the object store

            if (objStore.allObjUids(SubordinateAtomicAction.getType(), states)
                    && (states.notempty()))
            {
                Stack values = new Stack();
                boolean finished = false;
View Full Code Here

    }

    boolean restored = false;

    // Set up store
    ObjectStore aaStore = store();

    if (aaStore == null)
      return false;

    try
    {
      // Read object state

      InputObjectState oState = aaStore.read_committed(getSavingUid(), type());

      if (oState != null)
      {
        synchronized (this)
        {
View Full Code Here

    }

    boolean deactivated = false;

    // Set up store
    ObjectStore aaStore = store();

    if (aaStore == null)
      return false;

    try
    {
      // Write object state
      OutputObjectState oState = new OutputObjectState();

      if (save_state(oState, ObjectType.ANDPERSISTENT))
      {
        if (aaStore.write_committed(getSavingUid(), type(), oState))
        {
          deactivated = true;
        }
        else
        {
View Full Code Here

/*     */
/*     */     }
/*     */
/*     */     try
/*     */     {
/*  84 */       ObjectStore imple = new ObjectStore();
/*     */
/*  86 */       System.out.println("Status is " + imple.currentState(new Uid(uid), type));
/*     */
/*  88 */       InputObjectState buff = new InputObjectState();
/*     */
/*  90 */       imple.allObjUids(type, buff, 2);
/*     */
/*  92 */       Uid u = new Uid(Uid.nullUid());
/*     */
/*  94 */       u.unpack(buff);
/*     */
View Full Code Here

/*     */       }
/*     */
/*     */     }
/*     */
/* 143 */     if (sharedTransactionLog) {
/* 144 */       return new ObjectStore(actionStoreType, 13);
/*     */     }
/* 146 */     return new ObjectStore(actionStoreType);
/*     */   }
View Full Code Here

/*     */       }
/*     */
/* 460 */       if (ObjectStoreType.valid(objStoreType))
/*     */       {
/* 464 */         if (this.store == null) {
/* 465 */           this.store = new ObjectStore(ObjectStoreType.typeToClassName(objStoreType));
/*     */         }
/*     */
/* 468 */         this.store.unpack(os);
/* 469 */         this.shadowMade = os.unpackBoolean();
/*     */
View Full Code Here

/*     */
/* 289 */       if (ObjectStoreType.valid(objStoreType))
/*     */       {
/* 291 */         this.store = null;
/*     */
/* 293 */         this.store = new ObjectStore(ObjectStoreType.typeToClassName(objStoreType));
/* 294 */         this.store.unpack(os);
/*     */
/* 296 */         this.objectUid.unpack(os);
/* 297 */         this.typeName = os.unpackString();
/*     */       }
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.