Package org.apache.activemq.thread

Examples of org.apache.activemq.thread.Task


    public FailoverTransport() throws InterruptedIOException {

        stateTracker.setTrackTransactions(true);

        // Setup a task that is used to reconnect the a connection async.
        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {

            public boolean iterate() {

                Exception failure = null;
                synchronized (reconnectMutex) {
View Full Code Here


    public JournalPersistenceAdapter(Journal journal, PersistenceAdapter longTermPersistence, TaskRunnerFactory taskRunnerFactory) throws IOException {

        this.journal = journal;
        journal.setJournalEventListener(this);

        checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {
            public boolean iterate() {
                return doCheckpoint();
            }
        }, "ActiveMQ Journal Checkpoint Worker");
View Full Code Here

        this.peristenceAdapter = adapter;
        this.transactionStore = adapter.getTransactionStore();
        this.referenceStore = referenceStore;
        this.destination = destination;
        this.transactionTemplate = new TransactionTemplate(adapter, new ConnectionContext());
        asyncWriteTask = adapter.getTaskRunnerFactory().createTaskRunner(new Task() {

            public boolean iterate() {
                asyncWrite();
                return false;
            }
View Full Code Here

        }
    }

    public FanoutTransport() throws InterruptedIOException {
        // Setup a task that is used to reconnect the a connection async.
        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
            public boolean iterate() {
                return doConnect();
            }
        }, "ActiveMQ Fanout Worker: " + System.identityHashCode(this));
    }
View Full Code Here

            referenceStoreAdapter.deleteAllMessages();
        }
        referenceStoreAdapter.start();
        Set<Integer> files = referenceStoreAdapter.getReferenceFileIdsInUse();
        LOG.info("Active data files: " + files);
        checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {

            public boolean iterate() {
                doCheckpoint();
                return false;
            }
View Full Code Here

    public FailoverTransport() throws InterruptedIOException {
        brokerSslContext = SslContext.getCurrentSslContext();
        stateTracker.setTrackTransactions(true);
        // Setup a task that is used to reconnect the a connection async.
        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
            public boolean iterate() {
                boolean result = false;
                boolean buildBackup = true;
                boolean doReconnect = !disposed;
                synchronized (backupMutex) {
View Full Code Here

        }
    }

    public FanoutTransport() throws InterruptedIOException {
        // Setup a task that is used to reconnect the a connection async.
        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
            public boolean iterate() {
                return doConnect();
            }
        }, "ActiveMQ Fanout Worker: " + System.identityHashCode(this));
    }
View Full Code Here

    public FailoverTransport() throws InterruptedIOException {

        stateTracker.setTrackTransactions(true);
        // Setup a task that is used to reconnect the a connection async.
        reconnectTask = DefaultThreadPools.getDefaultTaskRunnerFactory().createTaskRunner(new Task() {
            public boolean iterate() {
              boolean result=false;
              boolean buildBackup=true;
              boolean doReconnect = !disposed;
              synchronized(backupMutex) {
View Full Code Here

    public JournalPersistenceAdapter(Journal journal, PersistenceAdapter longTermPersistence, TaskRunnerFactory taskRunnerFactory) throws IOException {

        this.journal = journal;
        journal.setJournalEventListener(this);

        checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {
            public boolean iterate() {
                return doCheckpoint();
            }
        }, "ActiveMQ Journal Checkpoint Worker");
View Full Code Here

        this.lock=referenceStore.getStoreLock();
        this.transactionStore = adapter.getTransactionStore();
        this.referenceStore = referenceStore;
        this.destination = destination;
        this.transactionTemplate = new TransactionTemplate(adapter, new ConnectionContext(new NonCachedMessageEvaluationContext()));
        asyncWriteTask = adapter.getTaskRunnerFactory().createTaskRunner(new Task() {

            public boolean iterate() {
                asyncWrite();
                return false;
            }
View Full Code Here

TOP

Related Classes of org.apache.activemq.thread.Task

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.