public static void close() throws IllegalStateException {
  Realm realm=realmCache.get();
  if (realm == null) {
    throw new IllegalStateException("realm already closed");
  }
  realm.close();
  realmCache.set(null);
}

public static void close ( ) throws IllegalStateException { Realm realm = realmCache . get ( ) ; if ( realm == null ) { throw new IllegalStateException ( "realm already closed" ) ; } realm . close ( ) ; realmCache . set ( null ) ; }
close realm for current thread .
