com.atlassian.confluence.api.service.journal
Class EntryProcessorResult<V>

java.lang.Object
  extended by com.atlassian.confluence.api.service.journal.EntryProcessorResult<V>

@PublicApi
public class EntryProcessorResult<V>
extends java.lang.Object

Result of entry processing operation.

Since:
5.6

Method Summary
 boolean equals(java.lang.Object o)
           
static
<V> EntryProcessorResult<V>
failure(V result, long failedEntryId)
          Create a result after a processing failure.
 java.lang.Long getFailedEntryId()
           
 java.lang.Long getLastSuccessfulId()
           
 V getResult()
           
 int hashCode()
           
static
<V> EntryProcessorResult<V>
partial(V result, long lastSuccessfulId)
          Create a result after having successfully processed some of the entries.
static
<V> EntryProcessorResult<V>
success(V result)
          Create result after having successfully processed all entries.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getResult

public V getResult()

getLastSuccessfulId

public java.lang.Long getLastSuccessfulId()

getFailedEntryId

public java.lang.Long getFailedEntryId()

success

public static <V> EntryProcessorResult<V> success(@Nullable
                                                  V result)
Create result after having successfully processed all entries.

Type Parameters:
V - result type
Parameters:
result - result
Returns:
result

partial

public static <V> EntryProcessorResult<V> partial(@Nullable
                                                  V result,
                                                  long lastSuccessfulId)
Create a result after having successfully processed some of the entries.

This static factory method should be used when entry processor processed only some of the entries.

Type Parameters:
V - result type
Parameters:
result - result
lastSuccessfulId - id of the last successfully processed JournalEntry
Returns:
result

failure

public static <V> EntryProcessorResult<V> failure(@Nullable
                                                  V result,
                                                  long failedEntryId)
Create a result after a processing failure.

This static factory method should be used when an entry could not be processed. Processing should stop immediately after the first failure.

Type Parameters:
V - result type
Parameters:
result - result
failedEntryId - id of JournalEntry which could not be processed
Returns:
result

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.