![JAR search and dependency download from the Maven repository](/logo.png)
com.playfab.PlayFabDataAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-sdk Show documentation
Show all versions of server-sdk Show documentation
PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience.
package com.playfab;
import com.playfab.internal.*;
import com.playfab.PlayFabDataModels.*;
import com.playfab.PlayFabErrors.*;
import com.playfab.PlayFabSettings;
import java.util.concurrent.*;
import java.util.*;
import com.google.gson.*;
import com.google.gson.reflect.*;
/**
* Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored
* directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events
* and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a
* flexible permissions system to control read and write access by other entities.
*/
public class PlayFabDataAPI {
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
/**
* Abort pending file uploads to an entity's profile.
* @param request AbortFileUploadsRequest
* @return Async Task will return AbortFileUploadsResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask> AbortFileUploadsAsync(final AbortFileUploadsRequest request) {
return new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateAbortFileUploadsAsync(request);
}
});
}
/**
* Abort pending file uploads to an entity's profile.
* @param request AbortFileUploadsRequest
* @return AbortFileUploadsResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult AbortFileUploads(final AbortFileUploadsRequest request) {
FutureTask> task = new FutureTask(new Callable>() {
public PlayFabResult call() throws Exception {
return privateAbortFileUploadsAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}
/** Abort pending file uploads to an entity's profile. */
@SuppressWarnings("unchecked")
private static PlayFabResult privateAbortFileUploadsAsync(final AbortFileUploadsRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
FutureTask
© 2015 - 2025 Weber Informatics LLC | Privacy Policy