private void processAddReplica(Sim_event ev)
    {
        if (ev == null) {
            return;
        }

        Object[] obj = (Object[]) ev.get_data();
        if (obj == null)
        {
            System.out.println(super.get_name() +
                    ".processAddReplica(): replica is null");
            return;
        }

        String name = (String) obj[0];      // get file name
        Integer resID = (Integer) obj[1];   // get resource id

        int result = DataGridTags.CTLG_ADD_REPLICA_SUCCESSFUL;
        try
        {
            /*****  // DEBUG
            System.out.println(super.get_name() +
                ".processAddReplica(): top RC for " + name);
            *****/

            // if this replica name is a new entry
            ArrayList list = (ArrayList) catalogueHash_.get(name);
            if (list == null)
            {
                /*****  // DEBUG
                System.out.println(super.get_name() +
                    ".processAddReplica(): empty list --> new catalogue for " +
                    name);
                *****/

                list = new ArrayList();   // create a new list
                list.add(resID);          // put resource ID into this list
                catalogueHash_.put(name, list);     // add into catalogue
            }
            else
            {
                list.add(resID);

                /*****  // DEBUG
                System.out.println(super.get_name() +
                    ".processAddReplica(): adds into the list for " + name);
                *****/
            }
        }
        catch (Exception e) {
            result = DataGridTags.CTLG_ADD_REPLICA_ERROR;
        }


        /*****  // DEBUG
        System.out.println(super.get_name() +
                ".processAddReplica(): sends the result back to " +
                GridSim.getEntityName((Integer) obj[1]));
        *****/

        sendMessage(name, DataGridTags.CTLG_ADD_REPLICA_RESULT,
                    result, resID.intValue() );
    }