Class ServiceInfoSnapshot
- java.lang.Object
-
- de.dytanic.cloudnet.common.document.gson.BasicJsonDocPropertyable
-
- de.dytanic.cloudnet.driver.serialization.json.SerializableJsonDocPropertyable
-
- de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot
-
- All Implemented Interfaces:
de.dytanic.cloudnet.common.document.gson.IJsonDocPropertyable,de.dytanic.cloudnet.common.INameable,SerializableObject,java.lang.Comparable<ServiceInfoSnapshot>
public class ServiceInfoSnapshot extends SerializableJsonDocPropertyable implements de.dytanic.cloudnet.common.INameable, java.lang.Comparable<ServiceInfoSnapshot>, SerializableObject
-
-
Field Summary
Fields Modifier and Type Field Description protected HostAndPortaddressprotected ServiceConfigurationconfigurationprotected HostAndPortconnectAddressprotected longconnectedTimeprotected longcreationTimeprotected ServiceLifeCyclelifeCycleprotected ProcessSnapshotprocessSnapshotstatic java.lang.reflect.TypeTYPE
-
Constructor Summary
Constructors Constructor Description ServiceInfoSnapshot()ServiceInfoSnapshot(long creationTime, HostAndPort address, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, ServiceConfiguration configuration)ServiceInfoSnapshot(long creationTime, HostAndPort address, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, ServiceConfiguration configuration)ServiceInfoSnapshot(long creationTime, HostAndPort address, HostAndPort connectAddress, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, ServiceConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull ServiceInfoSnapshot serviceInfoSnapshot)HostAndPortgetAddress()ServiceConfigurationgetConfiguration()HostAndPortgetConnectAddress()longgetConnectedTime()longgetCreationTime()ServiceLifeCyclegetLifeCycle()java.lang.StringgetName()ProcessSnapshotgetProcessSnapshot()<T> @NotNull java.util.Optional<T>getProperty(@NotNull ServiceProperty<T> property)ServiceIdgetServiceId()booleanisConnected()@NotNull SpecificCloudServiceProviderprovider()voidread(@NotNull ProtocolBuffer buffer)voidsetConnectedTime(long connectedTime)voidsetLifeCycle(ServiceLifeCycle lifeCycle)voidsetProcessSnapshot(ProcessSnapshot processSnapshot)<T> voidsetProperty(@NotNull ServiceProperty<T> property, T value)voidwrite(@NotNull ProtocolBuffer buffer)
-
-
-
Field Detail
-
TYPE
public static final java.lang.reflect.Type TYPE
-
creationTime
protected long creationTime
-
address
protected HostAndPort address
-
connectAddress
protected HostAndPort connectAddress
-
connectedTime
protected long connectedTime
-
lifeCycle
protected ServiceLifeCycle lifeCycle
-
processSnapshot
protected ProcessSnapshot processSnapshot
-
configuration
protected ServiceConfiguration configuration
-
-
Constructor Detail
-
ServiceInfoSnapshot
public ServiceInfoSnapshot(long creationTime, HostAndPort address, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, ServiceConfiguration configuration)
-
ServiceInfoSnapshot
public ServiceInfoSnapshot(long creationTime, HostAndPort address, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, ServiceConfiguration configuration)
-
ServiceInfoSnapshot
public ServiceInfoSnapshot(long creationTime, HostAndPort address, HostAndPort connectAddress, long connectedTime, ServiceLifeCycle lifeCycle, ProcessSnapshot processSnapshot, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, ServiceConfiguration configuration)
-
ServiceInfoSnapshot
public ServiceInfoSnapshot()
-
-
Method Detail
-
getCreationTime
public long getCreationTime()
-
getServiceId
public ServiceId getServiceId()
-
getAddress
public HostAndPort getAddress()
-
getConnectAddress
public HostAndPort getConnectAddress()
-
isConnected
public boolean isConnected()
-
getConnectedTime
public long getConnectedTime()
-
setConnectedTime
public void setConnectedTime(long connectedTime)
-
getLifeCycle
public ServiceLifeCycle getLifeCycle()
-
setLifeCycle
public void setLifeCycle(ServiceLifeCycle lifeCycle)
-
getProcessSnapshot
public ProcessSnapshot getProcessSnapshot()
-
setProcessSnapshot
public void setProcessSnapshot(ProcessSnapshot processSnapshot)
-
getConfiguration
public ServiceConfiguration getConfiguration()
-
provider
@NotNull public @NotNull SpecificCloudServiceProvider provider()
-
getProperty
@NotNull public <T> @NotNull java.util.Optional<T> getProperty(@NotNull @NotNull ServiceProperty<T> property)
-
setProperty
public <T> void setProperty(@NotNull @NotNull ServiceProperty<T> property, @Nullable T value)
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacede.dytanic.cloudnet.common.INameable
-
compareTo
public int compareTo(@NotNull @NotNull ServiceInfoSnapshot serviceInfoSnapshot)- Specified by:
compareToin interfacejava.lang.Comparable<ServiceInfoSnapshot>
-
write
public void write(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
writein interfaceSerializableObject- Overrides:
writein classSerializableJsonDocPropertyable
-
read
public void read(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
readin interfaceSerializableObject- Overrides:
readin classSerializableJsonDocPropertyable
-
-