code: public void setDocumentExpiration(@NonNull String id, Date expiration) throws CouchbaseLiteException {
          if (id == null) { throw new IllegalArgumentException("document id cannot be null."); }
  
          synchronized (lock) {
              try {
                  if (expiration == null) {
                      getC4Database().setExpiration(id, 0);
                  }
                  else {
                      getC4Database().setExpiration(id, expiration.getTime());
                  }
                  scheduleDocumentExpiration(0);
              }
              catch (LiteCoreException e) {
                  throw CBLStatus.convertException(e);
              }
          }
      }
docs: Sets an expiration date on a document. After this time, the document
  will be purged from the database.
  
  @param id         The ID of the Document
  @param expiration Nullable expiration timestamp as a Date, set timestamp to null
  to remove expiration date time from doc.
  @throws CouchbaseLiteException Throws an exception if any error occurs during the operation.