Class ComponentState
- java.lang.Object
-
- com.floragunn.searchguard.modules.state.ComponentState
-
- All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class ComponentState extends Object implements org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.xcontent.ToXContentObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classComponentState.ExceptionRecordstatic classComponentState.PartsStatsstatic classComponentState.State
-
Constructor Summary
Constructors Constructor Description ComponentState(int sortPrio, String type, String name)ComponentState(int sortPrio, String type, String name, Class<?> referenceClass)ComponentState(org.elasticsearch.common.io.stream.StreamInput in)
-
Method Summary
-
-
-
Constructor Detail
-
ComponentState
public ComponentState(int sortPrio, String type, String name, Class<?> referenceClass)
-
ComponentState
public ComponentState(org.elasticsearch.common.io.stream.StreamInput in) throws IOException- Throws:
IOException
-
-
Method Detail
-
getName
public String getName()
-
getType
public String getType()
-
getKey
public String getKey()
-
getSortingKey
public String getSortingKey()
-
writeTo
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws IOException- Specified by:
writeToin interfaceorg.elasticsearch.common.io.stream.Writeable- Throws:
IOException
-
updateStateFromParts
public ComponentState.PartsStats updateStateFromParts()
-
getState
public ComponentState.State getState()
-
isFailed
public boolean isFailed()
-
isInitialized
public boolean isInitialized()
-
setState
public void setState(ComponentState.State state)
-
setState
public void setState(ComponentState.State state, String subState)
-
getMessage
public String getMessage()
-
setMessage
public void setMessage(String message)
-
getDetailJson
public String getDetailJson()
-
setDetailJson
public void setDetailJson(String detailJson)
-
getInitException
public Throwable getInitException()
-
setFailed
public void setFailed(Throwable initException)
-
setFailed
public void setFailed(String message)
-
setInitialized
public void setInitialized()
-
setInitException
public void setInitException(Exception initException)
-
getLastExceptions
public Map<String,ComponentState.ExceptionRecord> getLastExceptions()
-
addLastException
public void addLastException(String key, ComponentState.ExceptionRecord exceptionRecord)
-
getStartedAt
public Instant getStartedAt()
-
setStartedAt
public void setStartedAt(Instant startedAt)
-
getInitializedAt
public Instant getInitializedAt()
-
setInitializedAt
public void setInitializedAt(Instant initializedAt)
-
getFailedAt
public Instant getFailedAt()
-
setFailedAt
public void setFailedAt(Instant failedAt)
-
getNextTryAt
public Instant getNextTryAt()
-
setNextTryAt
public void setNextTryAt(Instant nextTryAt)
-
getSubState
public String getSubState()
-
setSubState
public void setSubState(String subState)
-
addDetail
public void addDetail(Object detail)
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
getParts
public List<ComponentState> getParts()
-
addPart
public void addPart(ComponentState moduleState)
-
getPart
public ComponentState getPart(String type, String name)
-
getOrCreatePart
public ComponentState getOrCreatePart(String type, String name)
-
replacePart
public void replacePart(ComponentState part)
-
getTries
public int getTries()
-
startNextTry
public void startNextTry()
-
isMandatory
public boolean isMandatory()
-
setMandatory
public void setMandatory(boolean mandatory)
-
getJarFileName
public String getJarFileName()
-
getJarVersion
public String getJarVersion()
-
getJarBuildTime
public String getJarBuildTime()
-
getMinStartForInitializingState
public Instant getMinStartForInitializingState()
-
setReferenceClass
public void setReferenceClass(Class<?> referenceClass)
-
findPart
public ComponentState findPart(Function<ComponentState,Boolean> predicate)
-
getNodeId
public String getNodeId()
-
setNodeId
public void setNodeId(String node)
-
getNodeName
public String getNodeName()
-
setNodeName
public void setNodeName(String nodeName)
-
getLicense
public SearchGuardLicense getLicense()
-
setLicense
public void setLicense(SearchGuardLicense license)
-
isEnterprise
public boolean isEnterprise()
-
setEnterprise
public void setEnterprise(boolean enterprise)
-
getClassName
public String getClassName()
-
getSortPrio
public int getSortPrio()
-
setSortPrio
public void setSortPrio(int sortPrio)
-
getConfigVersion
public String getConfigVersion()
-
setConfigVersion
public void setConfigVersion(String configVersion)
-
setConfigVersion
public void setConfigVersion(long configVersion)
-
getConfigJson
public String getConfigJson()
-
setConfigJson
public void setConfigJson(String configJson)
-
-