Skip to content

[DE-242] deprecated MMFiles collection attributes #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/java/com/arangodb/entity/CollectionEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public class CollectionEntity implements Entity {
private String id;
private String name;
private Boolean waitForSync;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Boolean isVolatile;
private Boolean isSystem;
private CollectionStatus status;
Expand Down Expand Up @@ -58,6 +62,10 @@ public Boolean getWaitForSync() {
return waitForSync;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Boolean getIsVolatile() {
return isVolatile;
}
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/arangodb/entity/CollectionPropertiesEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,20 @@
*/
public class CollectionPropertiesEntity extends CollectionEntity {

/**
* @deprecated MMFiles only
*/
@Deprecated
private Boolean doCompact;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Long journalSize;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Integer indexBuckets;
private KeyOptions keyOptions;
private Long count;
Expand All @@ -48,26 +60,51 @@ public CollectionPropertiesEntity() {
minReplicationFactor = new MinReplicationFactor();
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Boolean getDoCompact() {
return doCompact;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public void setDoCompact(final Boolean doCompact) {
this.doCompact = doCompact;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Long getJournalSize() {
return journalSize;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public void setJournalSize(final Long journalSize) {
this.journalSize = journalSize;
}


/**
* @deprecated MMFiles only
*/
@Deprecated
public Integer getIndexBuckets() {
return indexBuckets;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public void setIndexBuckets(final Integer indexBuckets) {
this.indexBuckets = indexBuckets;
}
Expand Down
22 changes: 21 additions & 1 deletion src/main/java/com/arangodb/entity/CollectionStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,27 @@
*/
public enum CollectionStatus {

NEW_BORN_COLLECTION(1), UNLOADED(2), LOADED(3), IN_THE_PROCESS_OF_BEING_UNLOADED(4), DELETED(5);
/**
* @deprecated MMFiles only
*/
@Deprecated
NEW_BORN_COLLECTION(1),

/**
* @deprecated MMFiles only
*/
@Deprecated
UNLOADED(2),

LOADED(3),

/**
* @deprecated MMFiles only
*/
@Deprecated
IN_THE_PROCESS_OF_BEING_UNLOADED(4),

DELETED(5);

private final int status;

Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/arangodb/model/CollectionCreateOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,24 @@ public class CollectionCreateOptions {
private Integer writeConcern;
private KeyOptions keyOptions;
private Boolean waitForSync;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Boolean doCompact;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Boolean isVolatile;
private String[] shardKeys;
private Integer numberOfShards;
private Boolean isSystem;
private CollectionType type;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Integer indexBuckets;
private String distributeShardsLike;

Expand Down Expand Up @@ -73,14 +85,20 @@ protected CollectionCreateOptions name(final String name) {
return this;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Long getJournalSize() {
return journalSize;
}

/**
* @param journalSize The maximal size of a journal or datafile in bytes. The value must be at least 1048576 (1 MiB).
* @return options
* @deprecated MMFiles only
*/
@Deprecated
public CollectionCreateOptions journalSize(final Long journalSize) {
this.journalSize = journalSize;
return this;
Expand Down Expand Up @@ -199,19 +217,29 @@ public CollectionCreateOptions waitForSync(final Boolean waitForSync) {
return this;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Boolean getDoCompact() {
return doCompact;
}

/**
* @param doCompact whether or not the collection will be compacted (default is true)
* @return options
* @deprecated MMFiles only
*/
@Deprecated
public CollectionCreateOptions doCompact(final Boolean doCompact) {
this.doCompact = doCompact;
return this;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Boolean getIsVolatile() {
return isVolatile;
}
Expand All @@ -225,7 +253,9 @@ public Boolean getIsVolatile() {
* should therefore be used for cache-type collections only, and not for data that cannot be re-created
* otherwise. (The default is false)
* @return options
* @deprecated MMFiles only
*/
@Deprecated
public CollectionCreateOptions isVolatile(final Boolean isVolatile) {
this.isVolatile = isVolatile;
return this;
Expand Down Expand Up @@ -317,6 +347,10 @@ public CollectionCreateOptions type(final CollectionType type) {
return this;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Integer getIndexBuckets() {
return indexBuckets;
}
Expand All @@ -330,7 +364,9 @@ public Integer getIndexBuckets() {
* this value, but other index types might follow in future ArangoDB versions. Changes (see below) are
* applied when the collection is loaded the next time.
* @return options
* @deprecated MMFiles only
*/
@Deprecated
public CollectionCreateOptions indexBuckets(final Integer indexBuckets) {
this.indexBuckets = indexBuckets;
return this;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/arangodb/model/CollectionPropertiesOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
public class CollectionPropertiesOptions {

private Boolean waitForSync;
/**
* @deprecated MMFiles only
*/
@Deprecated
private Long journalSize;
private CollectionSchema schema;

Expand All @@ -48,6 +52,10 @@ public CollectionPropertiesOptions waitForSync(final Boolean waitForSync) {
return this;
}

/**
* @deprecated MMFiles only
*/
@Deprecated
public Long getJournalSize() {
return journalSize;
}
Expand All @@ -57,7 +65,9 @@ public Long getJournalSize() {
* that when changing the journalSize value, it will only have an effect for additional journals or
* datafiles that are created. Already existing journals or datafiles will not be affected.
* @return options
* @deprecated MMFiles only
*/
@Deprecated
public CollectionPropertiesOptions journalSize(final Long journalSize) {
this.journalSize = journalSize;
return this;
Expand Down