Package com.arjuna.ats.arjuna.state

Examples of com.arjuna.ats.arjuna.state.InputObjectState


          new Object[]{_timeFormat.format(oldestSurviving)});
      }

      try
      {
         InputObjectState uids = new InputObjectState() ;

         // find the uids of all the transaction status manager items
         if ( _objectStore.allObjUids(_itemTypeName, uids) )
         {
            Uid theUid = new Uid(Uid.nullUid()) ;
View Full Code Here


   {
       boolean ret_status = false ;
      
       try
      {
    InputObjectState objstate = getStore().read_committed( _pidUid,
                 _typeName ) ;
   
    if ( restore_state( objstate) )
        {
            return ret_status = true ;
View Full Code Here

  {
    DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Object Store");

    try
    {
      InputObjectState types = new InputObjectState();

      if (_objectStore.allTypes(types))
      {
        String theName;

        try
        {
          boolean endOfList = false;

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

            if (theName.compareTo("") == 0)
              endOfList = true;
            else
            {
View Full Code Here

        if ( node instanceof ObjectStoreDirectoryNode || node == _treeModel.getRoot() )
        {
            try
            {
                InputObjectState types = new InputObjectState();

                if (_objectStore.allTypes(types))
                {
                    try
                    {
                        boolean endOfList = false;

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

                            if (theName.compareTo("") == 0)
                                endOfList = true;
                            else
                            {
                                /** If the object is in the folder we are looking at then make sure it exists in the tree **/
                                if ( theName.startsWith(pathPrefix) )
                                {
                                    String newChild = theName.substring(pathPrefix.length());

                                    // Ensure this node doesn't contain more nodes
                                    if ( newChild.indexOf(GROUP_DELIMITER) == -1 )
                                    {
                                        SubTreeNode newNode;

                                        if ( getChildWithName(node, newChild) == null )
                                        {
                                            _treeModel.insertNodeInto( newNode = new ObjectStoreDirectoryNode(newChild, newChild), node, node.getChildCount() );
                                            newNode.setIconPanelEntry(new ObjectStoreViewEntry(theName, theName, newNode));
                                            _treeModel.insertNodeInto( new ObjectStoreDirectoryNode(this, pathPrefix), newNode, newNode.getChildCount() );
                                        }
                                        nodesAdded.add(newChild);
                                    }
                                    else
                                    {
                                        DefaultMutableTreeNode newNode;

                                        String name = newChild.substring(0, newChild.indexOf(GROUP_DELIMITER));

                                        if ( getChildWithName(node, name) == null )
                                        {
                                            _treeModel.insertNodeInto( newNode = new ObjectStoreDirectoryNode(name, name), node, node.getChildCount() );
                                            ((ObjectStoreBrowserNode)newNode).setIconPanelEntry(new ObjectStoreViewEntry(theName, theName, (ObjectStoreBrowserNode)newNode));
                                            _treeModel.insertNodeInto( new ObjectStoreDirectoryNode(this, pathPrefix), newNode, newNode.getChildCount() );
                                        }
                                        nodesAdded.add(name);
                                    }
                                }
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        // End of list
                    }
                }

                theName = File.separator + pathPrefix;

                if ( theName.length() > 0 )
                {
                    InputObjectState uids = new InputObjectState();

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

View Full Code Here

      initialScan = true;
    }

    try
    {
      InputObjectState uids = new InputObjectState();

      // take a snapshot of the log

      if (_objectStore.allObjUids(_typeName, uids))
      {
        Uid theUid = new Uid(Uid.nullUid());

        boolean endOfUids = false;

        while (!endOfUids)
        {
          // extract a uid
          theUid.unpack(uids);

          if (theUid.equals(Uid.nullUid()))
            endOfUids = true;
          else
          {
            Uid newUid = new Uid(theUid);

            if (initialScan)
              _scanM.put(newUid, newUid);
            else
            {
              if (!_scanM.contains(newUid))
              {
                if (_scanN == null)
                  _scanN = new Hashtable();

                _scanN.put(newUid, newUid);
              }
              else
              // log is present in this iteration, so move it
              {
                if (tsLogger.arjLoggerI18N.isInfoEnabled())
                  tsLogger.arjLoggerI18N
                      .info(
                          "com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionScanner_4",
                          new Object[]
                          { newUid });

                try
                {
                  InputObjectState state = _objectStore
                      .read_committed(newUid, _typeName);

                  if (state != null) // just in case recovery
                            // kicked-in
                  {
View Full Code Here

/*     */
/* 233 */     Xid[] indoubt = null;
/*     */     try
/*     */     {
/* 237 */       ObjectStore objStore = new ObjectStore(TxControl.getActionStoreType());
/* 238 */       InputObjectState states = new InputObjectState();
/*     */
/* 242 */       if ((objStore.allObjUids(SubordinateAtomicAction.getType(), states)) && (states.notempty()))
/*     */       {
/* 244 */         Stack values = new Stack();
/* 245 */         boolean finished = false;
/*     */         do
/*     */         {
View Full Code Here

    {
        if (ids == null)
            ids = new ArrayList<Uid> ();


        InputObjectState types = new InputObjectState();

        if (store.allTypes(types))
        {
            String theName;

            try
            {
                boolean endOfList = false;

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

                    if (theName.compareTo("") == 0)
                        endOfList = true;
                    else
                    {
                        if (objectType != null && !theName.equals(objectType))
                            continue;

                        InputObjectState uids = new InputObjectState();

                        if (store.allObjUids(theName, uids))
                        {
                            Uid theUid = new Uid(Uid.nullUid());
View Full Code Here

    {
        // Transaction type
            boolean ACCoordinators = false ;

        // uids per transaction type
        InputObjectState acc_uids = new InputObjectState() ;

        try
        {
            if (XTSLogger.arjLogger.isDebugEnabled())
            {
View Full Code Here

        return null;
    }

    public Durable2PCParticipant recreate(String id, byte[] recoveryState) throws Exception {
        if (id.startsWith(SubordinateCoordinator.PARTICIPANT_PREFIX)) {
            InputObjectState ios = new InputObjectState();
            ios.setBuffer(recoveryState);
            String className = ios.unpackString();
            Class participantClass =  this.getClass().getClassLoader().loadClass(className);
            Durable2PCParticipant participant = (Durable2PCParticipant)participantClass.newInstance();
            ((PersistableParticipant)participant).restoreState(ios);
            return participant;
        }
View Full Code Here

      }

  try
  {

      InputObjectState uids = new InputObjectState();
     
      // find the uids of all the contact items
      if (_objectStore.allObjUids(_typeName, uids))
      {
    Uid theUid = new Uid(Uid.nullUid());
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.state.InputObjectState

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.