ProgressIndicator (Neo4j Community 1.8.RC1 API)
Date: 2012-09-07

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.helpers
Interface ProgressIndicator

All Known Implementing Classes:
  ProgressIndicator.Decorator, ProgressIndicator.MultiProgress, ProgressIndicator.SimpleProgress, ProgressIndicator.UnknownEndProgress

    public interface ProgressIndicator

A generic interface for reporting progress by a tool. Can be implemented to support reporting progress from both a `single source`, or for the aggregate of `multiple sources`.

Author:
  Tobias Lindaaker

Nested Class Summary
`static class` | `ProgressIndicator.Decorator`
`static interface` | `ProgressIndicator.Factory` A factory interface for creating `ProgressIndicator`s.
`static class` | `ProgressIndicator.MultiProgress` A `ProgressIndicator` that can report the total progress for multiple sources.
`static class` | `ProgressIndicator.SimpleProgress` A `ProgressIndicator` that can report the progress for a single source.
`static class` | `ProgressIndicator.Textual` A factory implementation that creates progress indicators that log progress textually.
`static class` | `ProgressIndicator.UnknownEndProgress` Progress indicator where the end is unknown.

Field Summary
`static ProgressIndicator` | `NONE` A null object implementation of the ProgressIndicator interface.

Method Summary
`void` | `done()` Signal that the entire progress has completed.
`void` | `done(long totalProgress)` Mark the process as done with the current source.
`void` | `phase(String phase)` Set the name of the current phase of the progress.
`void` | `update(boolean incremental, long value)` Update the current progress count for the current source.

Field Detail

### NONE

    static final ProgressIndicator NONE

  A null object implementation of the ProgressIndicator interface.

Method Detail

### phase

    void phase(String phase)

  Set the name of the current phase of the progress. This is an optional method that users of progress indication can use to notify the progress indicator of the name of the current phase, if the progress indicator supports it. A progress indicator can choose not to support this feature by implementing this method as a no-op. A progress indicator must support clients that don't invoke this method.

  Parameters:
    `phase` - the name of the current phase.

### update

    void update(boolean incremental,
                long value)

  Update the current progress count for the current source.

  Parameters:
    `incremental` - whether this is an incremental update ( `true`) or an absolute assignment ( `false`) of the progress.
    `value` - the count to update the progress with.

### done

    void done(long totalProgress)

  Mark the process as done with the current source.

  Parameters:
    `totalProgress` - the total progress reached by the source.

### done

    void done()

  Signal that the entire progress has completed. This method is generally only used by processes that process multiple phases, where the `done(long)` method is used to indicate the completion of a single phase, rather than the completion of the entire process. To not invoke this method from a process that only processes a single phase is perfectly acceptable.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.