Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.CountDownLatch;

import com.google.common.util.concurrent.FutureCallback;

public class Main {
    private static <V> FutureCallback<V> callback(final CountDownLatch latch) {
        return new FutureCallback<V>() {
            @Override
            public void onSuccess(final V result) {
                latch.countDown();
            }

            @Override
            public void onFailure(final Throwable t) {
                latch.countDown();
            }
        };
    }
}