Use less gson internally.
This commit is contained in:
parent
8e692a03fe
commit
c8781c2d8e
33 changed files with 1405 additions and 905 deletions
|
|
@ -19,7 +19,7 @@
|
|||
package org.jdrupes.vmoperator.manager.events;
|
||||
|
||||
import java.util.Optional;
|
||||
import org.jdrupes.vmoperator.common.VmDefinitionModel;
|
||||
import org.jdrupes.vmoperator.common.VmDefinition;
|
||||
import org.jgrapes.core.Event;
|
||||
|
||||
/**
|
||||
|
|
@ -28,14 +28,14 @@ import org.jgrapes.core.Event;
|
|||
@SuppressWarnings("PMD.DataClass")
|
||||
public class GetDisplayPassword extends Event<String> {
|
||||
|
||||
private final VmDefinitionModel vmDef;
|
||||
private final VmDefinition vmDef;
|
||||
|
||||
/**
|
||||
* Instantiates a new returns the display secret.
|
||||
*
|
||||
* @param vmDef the vm name
|
||||
*/
|
||||
public GetDisplayPassword(VmDefinitionModel vmDef) {
|
||||
public GetDisplayPassword(VmDefinition vmDef) {
|
||||
this.vmDef = vmDef;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ public class GetDisplayPassword extends Event<String> {
|
|||
*
|
||||
* @return the vm definition
|
||||
*/
|
||||
public VmDefinitionModel vmDefinition() {
|
||||
public VmDefinition vmDefinition() {
|
||||
return vmDef;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
package org.jdrupes.vmoperator.manager.events;
|
||||
|
||||
import org.jdrupes.vmoperator.common.K8sClient;
|
||||
import org.jdrupes.vmoperator.common.VmDefinitionModel;
|
||||
import org.jdrupes.vmoperator.common.VmDefinition;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.EventPipeline;
|
||||
import org.jgrapes.core.Subchannel.DefaultSubchannel;
|
||||
|
|
@ -32,7 +32,7 @@ public class VmChannel extends DefaultSubchannel {
|
|||
|
||||
private final EventPipeline pipeline;
|
||||
private final K8sClient client;
|
||||
private VmDefinitionModel vmDefinition;
|
||||
private VmDefinition definition;
|
||||
private long generation = -1;
|
||||
|
||||
/**
|
||||
|
|
@ -56,18 +56,18 @@ public class VmChannel extends DefaultSubchannel {
|
|||
* @return the watch channel
|
||||
*/
|
||||
@SuppressWarnings("PMD.LinguisticNaming")
|
||||
public VmChannel setVmDefinition(VmDefinitionModel definition) {
|
||||
this.vmDefinition = definition;
|
||||
public VmChannel setVmDefinition(VmDefinition definition) {
|
||||
this.definition = definition;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last known definition of the VM.
|
||||
*
|
||||
* @return the json object
|
||||
* @return the defintion
|
||||
*/
|
||||
public VmDefinitionModel vmDefinition() {
|
||||
return vmDefinition;
|
||||
public VmDefinition vmDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
package org.jdrupes.vmoperator.manager.events;
|
||||
|
||||
import org.jdrupes.vmoperator.common.K8sObserver;
|
||||
import org.jdrupes.vmoperator.common.VmDefinitionModel;
|
||||
import org.jdrupes.vmoperator.common.VmDefinition;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Components;
|
||||
import org.jgrapes.core.Event;
|
||||
|
|
@ -36,7 +36,7 @@ public class VmDefChanged extends Event<Void> {
|
|||
|
||||
private final K8sObserver.ResponseType type;
|
||||
private final boolean specChanged;
|
||||
private final VmDefinitionModel vmDef;
|
||||
private final VmDefinition vmDefinition;
|
||||
|
||||
/**
|
||||
* Instantiates a new VM changed event.
|
||||
|
|
@ -46,10 +46,10 @@ public class VmDefChanged extends Event<Void> {
|
|||
* @param vmDefinition the VM definition
|
||||
*/
|
||||
public VmDefChanged(K8sObserver.ResponseType type, boolean specChanged,
|
||||
VmDefinitionModel vmDefinition) {
|
||||
VmDefinition vmDefinition) {
|
||||
this.type = type;
|
||||
this.specChanged = specChanged;
|
||||
this.vmDef = vmDefinition;
|
||||
this.vmDefinition = vmDefinition;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,19 +69,19 @@ public class VmDefChanged extends Event<Void> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the object.
|
||||
* Return the VM definition.
|
||||
*
|
||||
* @return the object.
|
||||
* @return the VM definition
|
||||
*/
|
||||
public VmDefinitionModel vmDefinition() {
|
||||
return vmDef;
|
||||
public VmDefinition vmDefinition() {
|
||||
return vmDefinition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(Components.objectName(this)).append(" [")
|
||||
.append(vmDef.getMetadata().getName()).append(' ').append(type);
|
||||
.append(vmDefinition.name()).append(' ').append(type);
|
||||
if (channels() != null) {
|
||||
builder.append(", channels=").append(Channel.toString(channels()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue