-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add periodic check for elasticsearch indices.
Add option to restrict index maintenance actions to specific indices Let index maintenance actions run on the master, if cluster coordinator is used
- Loading branch information
Showing
51 changed files
with
1,185 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
common/src/main/java/com/gentics/mesh/parameter/impl/IndexMaintenanceParametersImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.gentics.mesh.parameter.impl; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.raml.model.ParamType; | ||
import org.raml.model.parameter.QueryParameter; | ||
|
||
import com.gentics.mesh.handler.ActionContext; | ||
import com.gentics.mesh.parameter.AbstractParameters; | ||
import com.gentics.mesh.parameter.IndexMaintenanceParameters; | ||
|
||
/** | ||
* Parameter implementation for index maintenance parameters | ||
*/ | ||
public class IndexMaintenanceParametersImpl extends AbstractParameters implements IndexMaintenanceParameters { | ||
/** | ||
* Create empty instance | ||
*/ | ||
public IndexMaintenanceParametersImpl() { | ||
} | ||
|
||
/** | ||
* Create instance with parameters filled from the action context | ||
* @param ac action context | ||
*/ | ||
public IndexMaintenanceParametersImpl(ActionContext ac) { | ||
super(ac); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Index Maintenance Parameters"; | ||
} | ||
|
||
@Override | ||
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() { | ||
Map<String, QueryParameter> parameters = new HashMap<>(); | ||
|
||
// index parameter | ||
QueryParameter indexParameter = new QueryParameter(); | ||
indexParameter.setDescription("Index pattern to handle"); | ||
indexParameter.setExample("node-.*"); | ||
indexParameter.setRequired(false); | ||
indexParameter.setType(ParamType.STRING); | ||
parameters.put(INDEX_PARAMETER_KEY, indexParameter); | ||
return parameters; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
common/src/main/java/com/gentics/mesh/search/SearchMappingsCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.gentics.mesh.search; | ||
|
||
import com.gentics.mesh.cache.MeshCache; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
|
||
/** | ||
* Interface for the cache of expected search mappings | ||
*/ | ||
public interface SearchMappingsCache extends MeshCache<String, JsonObject> { | ||
/** | ||
* Put the value into the cache | ||
* @param key cache key | ||
* @param value cached value | ||
*/ | ||
void put(String key, JsonObject value); | ||
} |
Oops, something went wrong.