オブジェクトを保存して、すぐに保存されていることを確認しようとしていますが、機能していないようです。
これが私のオブジェクトです
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
@Entity
public class PlayerGroup {
@Id public String n;//sharks
public ArrayList<String> m;//members [39393,23932932,3223]
}
保存してすぐにロードしようとするコードは次のとおりです。
playerGroup = new PlayerGroup();
playerGroup.n = reqPlayerGroup.n;
playerGroup.m = reqPlayerGroup.m;
ofy().save().entity(playerGroup).now();
response.i = playerGroup;
PlayerGroup newOne = ofy().load().type(PlayerGroup.class).id(reqPlayerGroup.n).get();
ただし、「newOne」オブジェクトはnullです。保存が完了したばかりなのに。私は何が間違っているのですか?
--更新--後で(数分後のように)試してみると、オブジェクトが表示されることがありますが、保存した直後には表示されません。これは、高レプリケーションストレージと関係がありますか?