Interface CompactOnLaunchCallback
이 페이지의 내용
Atlas Device SDK는 더 이상 사용되지 않습니다. 자세한 내용은 지원 중단 페이지 를 참조하세요.
io.realm
This interface is used to determine if a Realm file should be compacted the first time the file is opened and before the instance is returned.Note that compacting a file can take a while, so compacting should generally only be done on a background thread or when used in combination with Realm.getInstanceAsync(RealmConfiguration, io.realm.Realm.Callback) .
메서드 요약
수정자 및 유형 | 메서드 및 설명 |
---|---|
공개 부울 | 이 메서드는 Realm 파일을 열기 전에 압축하여 사용자에게 반환해야 하는지 여부를 결정합니다. |
메서드 세부 정보
shouldCompact
이 메서드는 Realm 파일을 열기 전에 압축하여 사용자에게 반환해야 하는지 여부를 결정합니다. 총 파일 크기(데이터 + 여유 공간)와 파일의 데이터가 사용한 바이트가 전달됩니다. 매개변수
반환 {code true}로 설정하여 파일 압축을 시도해야 함을 나타냅니다. 그렇지 않으면 압축을 건너뜁니다. |