SnapshotsClient.SnapshotConflict
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
public String getConflictId ()
public Snapshot
getConflictingSnapshot ()
Returns the modified version of the Snapshot
in the case of a conflict.
public Snapshot
getSnapshot ()
Returns the server's version of the Snapshot
that was opened.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eSnapshotsClient.SnapshotConflict\u003c/code\u003e is a result delivered when a conflict is detected during snapshot operations like opening or resolving conflicts.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the server's snapshot version, the conflicting snapshot, and the conflict ID.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSnapshotConflict\u003c/code\u003e object also offers \u003ccode\u003eSnapshotContents\u003c/code\u003e to update data and resolve the conflict using \u003ccode\u003eSnapshotsClient.resolveConflict()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can obtain the conflict ID using \u003ccode\u003egetConflictId()\u003c/code\u003e, the conflicting snapshot with \u003ccode\u003egetConflictingSnapshot()\u003c/code\u003e, the resolution snapshot contents through \u003ccode\u003egetResolutionSnapshotContents()\u003c/code\u003e, and the server's snapshot version via \u003ccode\u003egetSnapshot()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# SnapshotsClient.SnapshotConflict\n\npublic static final class **SnapshotsClient.SnapshotConflict** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nResult delivered when a conflict was detected during [SnapshotsClient.open(SnapshotMetadata)](/android/reference/com/google/android/gms/games/SnapshotsClient#open(com.google.android.gms.games.snapshot.SnapshotMetadata)) or [SnapshotsClient.resolveConflict(String, Snapshot)](/android/reference/com/google/android/gms/games/SnapshotsClient#resolveConflict(java.lang.String,%20com.google.android.gms.games.snapshot.Snapshot)). \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](//developer.android.com/reference/java/lang/String.html) | [getConflictId](/android/reference/com/google/android/gms/games/SnapshotsClient.SnapshotConflict#getConflictId())() Returns the ID of the conflict to resolve, if any. |\n| [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot) | [getConflictingSnapshot](/android/reference/com/google/android/gms/games/SnapshotsClient.SnapshotConflict#getConflictingSnapshot())() Returns the modified version of the [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot) in the case of a conflict. |\n| [SnapshotContents](/android/reference/com/google/android/gms/games/snapshot/SnapshotContents) | [getResolutionSnapshotContents](/android/reference/com/google/android/gms/games/SnapshotsClient.SnapshotConflict#getResolutionSnapshotContents())() Returns the [SnapshotContents](/android/reference/com/google/android/gms/games/snapshot/SnapshotContents) object used to update the data in case of a conflict. |\n| [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot) | [getSnapshot](/android/reference/com/google/android/gms/games/SnapshotsClient.SnapshotConflict#getSnapshot())() Returns the server's version of the [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot) that was opened. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getConflictId** ()\n\nReturns the ID of the conflict to resolve, if any. Pass this to [SnapshotsClient.resolveConflict(String, Snapshot)](/android/reference/com/google/android/gms/games/SnapshotsClient#resolveConflict(java.lang.String,%20com.google.android.gms.games.snapshot.Snapshot)) when resolving the\nconflict. \n\n#### public [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot)\n**getConflictingSnapshot** ()\n\nReturns the modified version of the [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot)\nin the case of a conflict. \n\n#### public [SnapshotContents](/android/reference/com/google/android/gms/games/snapshot/SnapshotContents)\n**getResolutionSnapshotContents** ()\n\nReturns the [SnapshotContents](/android/reference/com/google/android/gms/games/snapshot/SnapshotContents)\nobject used to update the data in case of a conflict. Pass this to [SnapshotsClient.resolveConflict(String, String, SnapshotMetadataChange,\nSnapshotContents)](/android/reference/com/google/android/gms/games/SnapshotsClient#resolveConflict(java.lang.String,%20java.lang.String,%20com.google.android.gms.games.snapshot.SnapshotMetadataChange,%20com.google.android.gms.games.snapshot.SnapshotContents)) to resolve this conflict. \n\n#### public [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot)\n**getSnapshot** ()\n\nReturns the server's version of the [Snapshot](/android/reference/com/google/android/gms/games/snapshot/Snapshot)\nthat was opened."]]