MongoDbProgress Class
- java.
lang. Object - com.
azure. resourcemanager. datamigration. models. MongoDbProgress
- com.
Implements
public class MongoDbProgress
implements JsonSerializable<MongoDbProgress>
Base class for MongoDB migration outputs.
Constructor Summary
| Constructor | Description |
|---|---|
| MongoDbProgress() |
Creates an instance of Mongo |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| long |
bytesCopied()
Get the bytes |
| long |
documentsCopied()
Get the documents |
| String |
elapsedTime()
Get the elapsed |
|
Map<String,Mongo |
errors()
Get the errors property: The errors and warnings that have occurred for the current object. |
| long |
eventsPending()
Get the events |
| long |
eventsReplayed()
Get the events |
|
static
Mongo |
fromJson(JsonReader jsonReader)
Reads an instance of Mongo |
|
Offset |
lastEventTime()
Get the last |
|
Offset |
lastReplayTime()
Get the last |
| String |
name()
Get the name property: The name of the progress object. |
| String |
qualifiedName()
Get the qualified |
|
Mongo |
resultType()
Get the result |
|
Mongo |
state()
Get the state property: The state property. |
|
Json |
toJson(JsonWriter jsonWriter) |
| long |
totalBytes()
Get the total |
| long |
totalDocuments()
Get the total |
| void |
validate()
Validates the instance. |
|
Mongo |
withBytesCopied(long bytesCopied)
Set the bytes |
|
Mongo |
withDocumentsCopied(long documentsCopied)
Set the documents |
|
Mongo |
withElapsedTime(String elapsedTime)
Set the elapsed |
|
Mongo |
withErrors(Map<String,MongoDbError> errors)
Set the errors property: The errors and warnings that have occurred for the current object. |
|
Mongo |
withEventsPending(long eventsPending)
Set the events |
|
Mongo |
withEventsReplayed(long eventsReplayed)
Set the events |
|
Mongo |
withLastEventTime(OffsetDateTime lastEventTime)
Set the last |
|
Mongo |
withLastReplayTime(OffsetDateTime lastReplayTime)
Set the last |
|
Mongo |
withName(String name)
Set the name property: The name of the progress object. |
|
Mongo |
withQualifiedName(String qualifiedName)
Set the qualified |
|
Mongo |
withState(MongoDbMigrationState state)
Set the state property: The state property. |
|
Mongo |
withTotalBytes(long totalBytes)
Set the total |
|
Mongo |
withTotalDocuments(long totalDocuments)
Set the total |
Methods inherited from java.lang.Object
Constructor Details
MongoDbProgress
public MongoDbProgress()
Creates an instance of MongoDbProgress class.
Method Details
bytesCopied
public long bytesCopied()
Get the bytesCopied property: The number of document bytes copied during the Copying stage.
Returns:
documentsCopied
public long documentsCopied()
Get the documentsCopied property: The number of documents copied during the Copying stage.
Returns:
elapsedTime
public String elapsedTime()
Get the elapsedTime property: The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan format).
Returns:
errors
public Map<String,MongoDbError> errors()
Get the errors property: The errors and warnings that have occurred for the current object. The keys are the error codes.
Returns:
eventsPending
public long eventsPending()
Get the eventsPending property: The number of oplog events awaiting replay.
Returns:
eventsReplayed
public long eventsReplayed()
Get the eventsReplayed property: The number of oplog events replayed so far.
Returns:
fromJson
public static MongoDbProgress fromJson(JsonReader jsonReader)
Reads an instance of MongoDbProgress from the JsonReader.
Parameters:
Returns:
Throws:
lastEventTime
public OffsetDateTime lastEventTime()
Get the lastEventTime property: The timestamp of the last oplog event received, or null if no oplog event has been received yet.
Returns:
lastReplayTime
public OffsetDateTime lastReplayTime()
Get the lastReplayTime property: The timestamp of the last oplog event replayed, or null if no oplog event has been replayed yet.
Returns:
name
public String name()
Get the name property: The name of the progress object. For a collection, this is the unqualified collection name. For a database, this is the database name. For the overall migration, this is null.
Returns:
qualifiedName
public String qualifiedName()
Get the qualifiedName property: The qualified name of the progress object. For a collection, this is the database-qualified name. For a database, this is the database name. For the overall migration, this is null.
Returns:
resultType
public MongoDbProgressResultType resultType()
Get the resultType property: The type of progress object.
Returns:
state
public MongoDbMigrationState state()
Get the state property: The state property.
Returns:
toJson
totalBytes
public long totalBytes()
Get the totalBytes property: The total number of document bytes on the source at the beginning of the Copying stage, or -1 if the total size was unknown.
Returns:
totalDocuments
public long totalDocuments()
Get the totalDocuments property: The total number of documents on the source at the beginning of the Copying stage, or -1 if the total count was unknown.
Returns:
validate
public void validate()
Validates the instance.
withBytesCopied
public MongoDbProgress withBytesCopied(long bytesCopied)
Set the bytesCopied property: The number of document bytes copied during the Copying stage.
Parameters:
Returns:
withDocumentsCopied
public MongoDbProgress withDocumentsCopied(long documentsCopied)
Set the documentsCopied property: The number of documents copied during the Copying stage.
Parameters:
Returns:
withElapsedTime
public MongoDbProgress withElapsedTime(String elapsedTime)
Set the elapsedTime property: The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan format).
Parameters:
Returns:
withErrors
public MongoDbProgress withErrors(Map<String,MongoDbError> errors)
Set the errors property: The errors and warnings that have occurred for the current object. The keys are the error codes.
Parameters:
Returns:
withEventsPending
public MongoDbProgress withEventsPending(long eventsPending)
Set the eventsPending property: The number of oplog events awaiting replay.
Parameters:
Returns:
withEventsReplayed
public MongoDbProgress withEventsReplayed(long eventsReplayed)
Set the eventsReplayed property: The number of oplog events replayed so far.
Parameters:
Returns:
withLastEventTime
public MongoDbProgress withLastEventTime(OffsetDateTime lastEventTime)
Set the lastEventTime property: The timestamp of the last oplog event received, or null if no oplog event has been received yet.
Parameters:
Returns:
withLastReplayTime
public MongoDbProgress withLastReplayTime(OffsetDateTime lastReplayTime)
Set the lastReplayTime property: The timestamp of the last oplog event replayed, or null if no oplog event has been replayed yet.
Parameters:
Returns:
withName
public MongoDbProgress withName(String name)
Set the name property: The name of the progress object. For a collection, this is the unqualified collection name. For a database, this is the database name. For the overall migration, this is null.
Parameters:
Returns:
withQualifiedName
public MongoDbProgress withQualifiedName(String qualifiedName)
Set the qualifiedName property: The qualified name of the progress object. For a collection, this is the database-qualified name. For a database, this is the database name. For the overall migration, this is null.
Parameters:
Returns:
withState
public MongoDbProgress withState(MongoDbMigrationState state)
Set the state property: The state property.
Parameters:
Returns:
withTotalBytes
public MongoDbProgress withTotalBytes(long totalBytes)
Set the totalBytes property: The total number of document bytes on the source at the beginning of the Copying stage, or -1 if the total size was unknown.
Parameters:
Returns:
withTotalDocuments
public MongoDbProgress withTotalDocuments(long totalDocuments)
Set the totalDocuments property: The total number of documents on the source at the beginning of the Copying stage, or -1 if the total count was unknown.
Parameters:
Returns: