ProgressIndicator.SimpleProgress (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
Class ProgressIndicator.SimpleProgress

    java.lang.Object
      org.neo4j.helpers.ProgressIndicator.SimpleProgress

All Implemented Interfaces:
  ProgressIndicator

Direct Known Subclasses:
  ProgressIndicator.MultiProgress

Enclosing interface:
  ProgressIndicator

    public abstract static class ProgressIndicator.SimpleProgress

extends Object
implements ProgressIndicator

A `ProgressIndicator` that can report the progress for a single source. Should be initialized with the total count that the source is going to reach.

Author:
  Tobias Lindaaker

Nested Class Summary

Nested classes/interfaces inherited from interface org.neo4j.helpers.ProgressIndicator
`ProgressIndicator.Decorator, ProgressIndicator.Factory, ProgressIndicator.MultiProgress, ProgressIndicator.SimpleProgress, ProgressIndicator.Textual, ProgressIndicator.UnknownEndProgress`

Field Summary

Fields inherited from interface org.neo4j.helpers.ProgressIndicator
`NONE`

Constructor Summary
`ProgressIndicator.SimpleProgress(long total)` Create a `ProgressIndicator` for a single source.

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.
`protected abstract void` | `progress(int permille)` Implement this method to emit the progress notifications.
`static ProgressIndicator.SimpleProgress` | `textual(PrintStream out, long total)` Returns a simple `ProgressIndicator` that reports progress by printing to the provided stream.
`void` | `update(boolean incremental, long value)` Update the current progress count for the current source.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProgressIndicator.SimpleProgress

    public ProgressIndicator.SimpleProgress(long total)

  Create a `ProgressIndicator` for a single source.

  Parameters:
    `total` - the total count the process will reach.

Method Detail

### textual

    public static ProgressIndicator.SimpleProgress textual(PrintStream out,
                                                           long total)

  Returns a simple `ProgressIndicator` that reports progress by printing to the provided stream.

  Parameters:
    `out` - the stream to print progress indication to.
    `total` - the total count the process will reach.
  Returns:
    a simple `ProgressIndicator` that reports progress by printing to the provided stream.

### phase

    public void phase(String phase)

  Description copied from interface: `ProgressIndicator`
  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.

  Specified by:
    `phase` in interface `ProgressIndicator`
  Parameters:
    `phase` - the name of the current phase.

### update

    public void update(boolean incremental,
                       long value)

  Description copied from interface: `ProgressIndicator`
  Update the current progress count for the current source.

  Specified by:
    `update` in interface `ProgressIndicator`
  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

    public void done(long totalProgress)

  Description copied from interface: `ProgressIndicator`
  Mark the process as done with the current source.

  Specified by:
    `done` in interface `ProgressIndicator`
  Parameters:
    `totalProgress` - the total progress reached by the source.

### done

    public void done()

  Description copied from interface: `ProgressIndicator`
  Signal that the entire progress has completed. This method is generally only used by processes that process multiple phases, where the `ProgressIndicator.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.

  Specified by:
    `done` in interface `ProgressIndicator`

### progress

    protected abstract void progress(int permille)

  Implement this method to emit the progress notifications.

  Parameters:
    `permille` - value from 0 (just started) to 1000 (done) indicating how far along the process is.

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.