Package com.sun.messaging.jmq.jmsserver.persist

Examples of com.sun.messaging.jmq.jmsserver.persist.ChangeRecordInfo


    if (stamp.longValue() > timestamp)
        break;
      }

      for (; i < size; i++) {
    records.add(new ChangeRecordInfo((byte[])recordList.get(i),
                        ((Long)timeList.get(i)).longValue()));
      }

      return records;
  }
View Full Code Here


     */
    public List<ChangeRecordInfo> getAllConfigRecords() throws BrokerException {
    ArrayList records = new ArrayList();

    for (int i = 0; i < timeList.size(); i++) {
        records.add(new ChangeRecordInfo((byte[])recordList.get(i),
                        ((Long)timeList.get(i)).longValue()));
    }
    return records;
    }
View Full Code Here

            conn = mgr.getConnection( false );

            Util.RetryStrategy retry = null;
            do {
                try {
                    ChangeRecordInfo resetcri = ChangeRecord.makeResetRecord( true );
                    dao.insertResetRecord( conn, resetcri, false);
                    Iterator itr = records.iterator();
                    ChangeRecordInfo cri = null;
                    while (itr.hasNext()) {
                        cri = (ChangeRecordInfo)itr.next();
                        if (cri.getType() == ChangeRecordInfo.TYPE_RESET_PERSISTENCE) {
                            itr.remove();
                            continue;
                        }
                        cri.setResetUUID(resetcri.getUUID());
                        cri.setTimestamp(System.currentTimeMillis());
                        ((ShareConfigRecordDAOImpl)dao).insert( conn, cri, false );
                    }
                    ((ShareConfigRecordDAOImpl)dao).setResetRecordFLAGNULL( conn );

                    conn.commit();
View Full Code Here

    if (stamp.longValue() > timestamp)
        break;
      }

      for (; i < size; i++) {
    records.add(new ChangeRecordInfo((byte[])recordList.get(i),
                        ((Long)timeList.get(i)).longValue()));
      }

      return records;
  }
View Full Code Here

     */
    public List<ChangeRecordInfo> getAllConfigRecords() throws BrokerException {
    ArrayList records = new ArrayList();

    for (int i = 0; i < timeList.size(); i++) {
        records.add(new ChangeRecordInfo((byte[])recordList.get(i),
                        ((Long)timeList.get(i)).longValue()));
    }
  return records;
    }
View Full Code Here

            pstmt.setLong( 1, timestamp );
            rs = pstmt.executeQuery();
            while ( rs.next() ) {
                try {
                    byte[] buf = Util.readBytes( rs, 1 );
                    records.add( new ChangeRecordInfo(buf, 0) );
                } catch (IOException e) {
                    // fail to load one record; just log the record TS
                    IOException ex = DBManager.wrapIOException(
                        "[" + selectRecordsSinceSQL + "]", e );
                    logger.logStack( Logger.ERROR,
View Full Code Here

            while ( rs.next() ) {
                long createdTS = -1;
                try {
                    createdTS = rs.getLong( 2 );
                    byte[] buf = Util.readBytes( rs, 1 );
                    records.add( new ChangeRecordInfo(buf, createdTS) );
                } catch (IOException e) {
                    // fail to load one record; just log the record TS
                    IOException ex = DBManager.wrapIOException(
                        "[" + selectAllSQL + "]", e );
                    logger.logStack( Logger.ERROR,
View Full Code Here

                long seqv = -1;
                String uuidv = null;
                byte[] buf =  null;
                int typv = 0;
                long tsv = -1;
                ChangeRecordInfo cri = null;
                boolean loadfail = false;
                boolean reseted = false, foundreset = false;
                String newResetUUID = null;
                while ( rs.next() ) {
                    try {
                        seqv = rs.getLong( 1 );
                        uuidv  = rs.getString( 2 );
                        buf = Util.readBytes( rs, 3 );
                        typv  = rs.getInt( 4 );
                        tsv  = rs.getLong( 5 );
                        if (typv == ChangeRecordInfo.TYPE_RESET_PERSISTENCE) {
                            foundreset = true;
                            if (uuidv.equals(resetUUID)) {
                                continue;
                            }
                            newResetUUID = uuidv;
                            reseted = true;
                            break;
                        }
                        cri = new ChangeRecordInfo(Long.valueOf(seqv), uuidv, buf, typv, tsv);
                        cri.setResetUUID(resetUUID);
                        cri.setIsSelectAll(false);
                        records.add(cri);
                    } catch (IOException e) {
                        loadfail = true;
                        IOException ex = getDBManager().wrapIOException(
                                         "[" + selectAllSQL + "]", e );
View Full Code Here

            long seqv = -1;
            String uuidv = null;
            byte[] buf =  null;
            int typv = 0;
            long tsv = -1;
            ChangeRecordInfo cri = null;
            boolean foundreset = false;
            while ( rs.next() ) {
                try {
                    seqv = rs.getLong( 1 );
                    uuidv  = rs.getString( 2 );
                    buf = Util.readBytes( rs, 3 );
                    typv  = rs.getInt( 4 );
                    if (typv == ChangeRecordInfo.TYPE_RESET_PERSISTENCE) {
                        foundreset = true;
                    }
                    tsv  = rs.getLong( 5 );
                    cri = new ChangeRecordInfo(Long.valueOf(seqv), uuidv, buf, typv, tsv);
                    cri.setIsSelectAll(true);
                    records.add(cri);
                } catch (IOException e) {
                    IOException ex = getDBManager().wrapIOException(
                        "[" + selectAllSQL + "]", e );
                    logger.logStack( Logger.ERROR,
View Full Code Here

        StringBuffer buf = new StringBuffer();
        ArrayList<ChangeRecordInfo> records = null;
        try {
            records = getAllRecords( conn );
            Iterator<ChangeRecordInfo>  itr = records.iterator();
            ChangeRecordInfo rec = null;
            while (itr.hasNext()) {
                rec = itr.next();
                buf.append(rec.toString()).append("\n");
            }
        } catch ( Exception e ) {
            logger.log( Logger.ERROR, e.getMessage(), e.getCause() );
        }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.persist.ChangeRecordInfo

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.