Example usage for java.rmi UnexpectedException printStackTrace

List of usage examples for java.rmi UnexpectedException printStackTrace

Introduction

In this page you can find the example usage for java.rmi UnexpectedException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:io.pyd.synchro.SyncJob.java

@Override
public void execute(JobExecutionContext ctx) throws JobExecutionException {
    String keepRemoteData = ctx.getMergedJobDataMap().getString(JobEditor.AUTO_KEEP_REMOTE);
    if (keepRemoteData != null) {
        autoKeepRemoteFile = Boolean.valueOf(keepRemoteData);
    }//from  ww  w.j  a v a2s.  com
    String keepLocalData = ctx.getMergedJobDataMap().getString(JobEditor.AUTO_KEEP_LOCAL);
    if (keepLocalData != null) {
        autoKeepLocalFile = Boolean.valueOf(keepLocalData);
    }
    currentJobNodeID = ctx.getMergedJobDataMap().getString("node-id");
    if (ctx.getMergedJobDataMap().containsKey("clear-snapshots")
            && ctx.getMergedJobDataMap().getBooleanValue("clear-snapshots")) {
        clearSnapshots = true;
    } else {
        clearSnapshots = false;
    }
    if (ctx.getMergedJobDataMap().containsKey("local-monitoring")
            && ctx.getMergedJobDataMap().getBooleanValue("local-monitoring")) {
        localWatchOnly = true;
    } else {
        localWatchOnly = false;
    }

    // nodeDao = getCoreManager().getNodeDao();

    IEhcacheListDeterminant<Node> determinant = new IEhcacheListDeterminant<Node>() {

        @Override
        public Object computeKey(Node object) {
            // we use path as node key in ehcache list
            return object == null ? null : object.getPath();
        }
    };
    try {
        EhcacheListFactory.getInstance().initCaches(8, determinant, currentJobNodeID,
                DIFF_NODE_LISTS_SAVED_LIST, DIFF_NODE_LISTS_CREATED_LIST, LOAD_REMOTE_CHANGES_LIST,
                LOAD_LOCAL_CHANGES_LIST, INDEXATION_SNAPSHOT_LIST, REMOTE_SNAPSHOT_LIST, LOCAL_SNAPSHOT_LIST);
    } catch (UnexpectedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    long start = System.nanoTime();
    this.run();
    long elapsedTime = System.nanoTime() - start;
    Logger.getRootLogger().info(
            "This pass took " + elapsedTime / 1000000 + " milliSeconds (Local : " + this.localWatchOnly + ")");
}