com.netflix.config
Class PollResult

java.lang.Object
  extended by com.netflix.config.WatchedUpdateResult
      extended by com.netflix.config.PollResult

public class PollResult
extends WatchedUpdateResult

This class represents result from a poll of configuration source. The result may be the complete content of the configuration source, or an incremental one.


Field Summary
protected  java.lang.Object checkPoint
           
 
Fields inherited from class com.netflix.config.WatchedUpdateResult
added, changed, complete, deleted, incremental
 
Method Summary
static PollResult createFull(java.util.Map<java.lang.String,java.lang.Object> complete)
          Create a full result that represents the complete content of the configuration source.
static PollResult createIncremental(java.util.Map<java.lang.String,java.lang.Object> added, java.util.Map<java.lang.String,java.lang.Object> changed, java.util.Map<java.lang.String,java.lang.Object> deleted, java.lang.Object checkPoint)
          Create a result that represents incremental changes from the configuration source.
 java.lang.Object getCheckPoint()
           
 
Methods inherited from class com.netflix.config.WatchedUpdateResult
createIncremental, getAdded, getChanged, getComplete, getDeleted, hasChanges, isIncremental
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

checkPoint

protected final java.lang.Object checkPoint
Method Detail

createFull

public static PollResult createFull(java.util.Map<java.lang.String,java.lang.Object> complete)
Create a full result that represents the complete content of the configuration source.

Parameters:
complete - map that contains all the properties

createIncremental

public static PollResult createIncremental(java.util.Map<java.lang.String,java.lang.Object> added,
                                           java.util.Map<java.lang.String,java.lang.Object> changed,
                                           java.util.Map<java.lang.String,java.lang.Object> deleted,
                                           java.lang.Object checkPoint)
Create a result that represents incremental changes from the configuration source.

Parameters:
added - properties added
changed - properties changed
deleted - properties deleted, in which case the value in the map will be ignored
checkPoint - Object that served as a marker for this incremental change, for example, a time stamp of the last change.

getCheckPoint

public final java.lang.Object getCheckPoint()
Returns:
the check point (marker) for this poll result