Package org.apache.activemq.store.kahadb.data

Examples of org.apache.activemq.store.kahadb.data.KahaAckMessageFileMapCommand


    }

    @SuppressWarnings("unchecked")
    private Location recoverAckMessageFileMap() throws IOException {
        if (metadata.ackMessageFileMapLocation != null) {
            KahaAckMessageFileMapCommand audit = (KahaAckMessageFileMapCommand) load(metadata.ackMessageFileMapLocation);
            try {
                ObjectInputStream objectIn = new ObjectInputStream(audit.getAckMessageFileMap().newInput());
                metadata.ackMessageFileMap = (Map<Integer, Set<Integer>>) objectIn.readObject();
                return journal.getNextLocation(metadata.ackMessageFileMapLocation);
            } catch (Exception e) {
                LOG.warn("Cannot recover ackMessageFileMap", e);
                return journal.getNextLocation(null);
View Full Code Here


        ObjectOutputStream oout = new ObjectOutputStream(baos);
        oout.writeObject(metadata.ackMessageFileMap);
        oout.flush();
        oout.close();
        // using completion callback allows a disk sync to be avoided when enableJournalDiskSyncs = false
        Location location = store(new KahaAckMessageFileMapCommand().setAckMessageFileMap(new Buffer(baos.toByteArray())), nullCompletionCallback);
        try {
            location.getLatch().await();
        } catch (InterruptedException e) {
            throw new InterruptedIOException(e.toString());
        }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private Location recoverAckMessageFileMap() throws IOException {
        if (metadata.ackMessageFileMapLocation != null) {
            KahaAckMessageFileMapCommand audit = (KahaAckMessageFileMapCommand) load(metadata.ackMessageFileMapLocation);
            try {
                ObjectInputStream objectIn = new ObjectInputStream(audit.getAckMessageFileMap().newInput());
                metadata.ackMessageFileMap = (Map<Integer, Set<Integer>>) objectIn.readObject();
                return journal.getNextLocation(metadata.ackMessageFileMapLocation);
            } catch (Exception e) {
                LOG.warn("Cannot recover ackMessageFileMap", e);
                return journal.getNextLocation(null);
View Full Code Here

        ObjectOutputStream oout = new ObjectOutputStream(baos);
        oout.writeObject(metadata.ackMessageFileMap);
        oout.flush();
        oout.close();
        // using completion callback allows a disk sync to be avoided when enableJournalDiskSyncs = false
        Location location = store(new KahaAckMessageFileMapCommand().setAckMessageFileMap(new Buffer(baos.toByteArray())), nullCompletionCallback);
        try {
            location.getLatch().await();
        } catch (InterruptedException e) {
            throw new InterruptedIOException(e.toString());
        }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private Location recoverAckMessageFileMap() throws IOException {
        if (metadata.ackMessageFileMapLocation != null) {
            KahaAckMessageFileMapCommand audit = (KahaAckMessageFileMapCommand) load(metadata.ackMessageFileMapLocation);
            try {
                ObjectInputStream objectIn = new ObjectInputStream(audit.getAckMessageFileMap().newInput());
                metadata.ackMessageFileMap = (Map<Integer, Set<Integer>>) objectIn.readObject();
                return journal.getNextLocation(metadata.ackMessageFileMapLocation);
            } catch (Exception e) {
                LOG.warn("Cannot recover ackMessageFileMap", e);
                return journal.getNextLocation(null);
View Full Code Here

        ObjectOutputStream oout = new ObjectOutputStream(baos);
        oout.writeObject(metadata.ackMessageFileMap);
        oout.flush();
        oout.close();
        // using completion callback allows a disk sync to be avoided when enableJournalDiskSyncs = false
        Location location = store(new KahaAckMessageFileMapCommand().setAckMessageFileMap(new Buffer(baos.toByteArray())), nullCompletionCallback);
        try {
            location.getLatch().await();
        } catch (InterruptedException e) {
            throw new InterruptedIOException(e.toString());
        }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private Location recoverAckMessageFileMap() throws IOException {
        if (metadata.ackMessageFileMapLocation != null) {
            KahaAckMessageFileMapCommand audit = (KahaAckMessageFileMapCommand) load(metadata.ackMessageFileMapLocation);
            try {
                ObjectInputStream objectIn = new ObjectInputStream(audit.getAckMessageFileMap().newInput());
                metadata.ackMessageFileMap = (Map<Integer, Set<Integer>>) objectIn.readObject();
                return journal.getNextLocation(metadata.ackMessageFileMapLocation);
            } catch (Exception e) {
                LOG.warn("Cannot recover ackMessageFileMap", e);
                return journal.getNextLocation(null);
View Full Code Here

        ObjectOutputStream oout = new ObjectOutputStream(baos);
        oout.writeObject(metadata.ackMessageFileMap);
        oout.flush();
        oout.close();
        // using completion callback allows a disk sync to be avoided when enableJournalDiskSyncs = false
        Location location = store(new KahaAckMessageFileMapCommand().setAckMessageFileMap(new Buffer(baos.toByteArray())), nullCompletionCallback);
        try {
            location.getLatch().await();
        } catch (InterruptedException e) {
            throw new InterruptedIOException(e.toString());
        }
View Full Code Here

TOP

Related Classes of org.apache.activemq.store.kahadb.data.KahaAckMessageFileMapCommand

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.