コード例 #1
0
 private static void setCurrentVersion() {
   myRecords.putInt(HEADER_VERSION_OFFSET, VERSION);
   myRecords.putLong(HEADER_TIMESTAMP_OFFSET, System.currentTimeMillis());
   myAttributes.setVersion(VERSION);
   myContents.setVersion(VERSION);
   myRecords.putInt(HEADER_CONNECTION_STATUS_OFFSET, SAFELY_CLOSED_MAGIC);
 }
コード例 #2
0
 private static void markClean() {
   if (myDirty) {
     myDirty = false;
     myRecords.putInt(
         HEADER_CONNECTION_STATUS_OFFSET, myCorrupted ? CORRUPTED_MAGIC : SAFELY_CLOSED_MAGIC);
   }
 }
コード例 #3
0
 private static void markDirty() {
   if (!myDirty) {
     myDirty = true;
     myRecords.putInt(HEADER_CONNECTION_STATUS_OFFSET, CONNECTED_MAGIC);
   }
 }