public Future<?> execute(CameraCommand command){
  if (mClosed) {
    return Futures.immediateFuture(null);
  }
synchronized (mLock) {
    if (mExecutor == null) {
      mExecutor=mExecutorProvider.get();
    }
    checkNotNull(mExecutor);
    return mExecutor.submit(new CommandRunnable(command));
  }
}

public Future < ? > execute ( CameraCommand command ) { if ( mClosed ) { return Futures . immediateFuture ( null ) ; } synchronized ( mLock ) { if ( mExecutor == null ) { mExecutor = mExecutorProvider . get ( ) ; } checkNotNull ( mExecutor ) ; return mExecutor . submit ( new CommandRunnable ( command ) ) ; } }
executes the given command , returning a future to indicate its status and allow ( interruptible ) cancellation .
