Skip to content

Commit a89bea8

Browse files
greenrobotgreenrobot-team
authored andcommitted
Add EXPIRATION_TIME property flag and new debug flags (#798)
1 parent e6f9f70 commit a89bea8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

objectbox-java/src/main/java/io/objectbox/DebugFlags.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,15 @@ private DebugFlags() { }
3333
public static final int LOG_CACHE_HITS = 32;
3434
public static final int LOG_CACHE_ALL = 64;
3535
public static final int LOG_TREE = 128;
36+
/**
37+
* For a limited number of error conditions, this will try to print stack traces.
38+
* Note: this is Linux-only, experimental, and has several limitations:
39+
* The usefulness of these stack traces depends on several factors and might not be helpful at all.
40+
*/
41+
public static final int LOG_EXCEPTION_STACK_TRACE = 256;
42+
/**
43+
* Run a quick self-test to verify basic threading; somewhat paranoia to check the platform and the library setup.
44+
*/
45+
public static final int RUN_THREADING_SELF_TEST = 512;
3646
}
3747

objectbox-java/src/main/java/io/objectbox/model/PropertyFlags.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,11 @@ private PropertyFlags() { }
9797
* Unique on-conflict strategy: the object being put replaces any existing conflicting object (deletes it).
9898
*/
9999
public static final int UNIQUE_ON_CONFLICT_REPLACE = 32768;
100+
/**
101+
* If a date property has this flag (max. one per entity type), the date value specifies the time by which
102+
* the object expires, at which point it MAY be deleted. There's no strict guarantee when the deletion happens.
103+
* However, the deletion process can be triggered by an API call.
104+
*/
105+
public static final int EXPIRATION_TIME = 65536;
100106
}
101107

0 commit comments

Comments
 (0)