我需要一个在A4上有两个A5的pdf文件。
像这样,在我打印A4之后,该怎么做?
private boolean isUpdateRunning;
private User(String documentID)
{
this.documentID = documentID;
isUpdateRunning = false;
}
private void attachUpdateEventListeners()
{
FirebaseFirestore.getInstance()
.collection(USERS_COLLECTION_NAME)
.document(documentID)
.addSnapshotListener((documentSnapshot, exception) -> {
if (exception == null)
{
isUpdateRunning = true;
// omitted code
// re-assigning fields...
isUpdateRunning = false;
}
// omitted code
});
}
public String myGetter()
{
if (isUpdateRunning)
{
Thread.sleep(1000); // how to handle the InterruptedException?
}
return myField;
}