CLOUDSTACK-1301: long -> Long

This commit is contained in:
Wei Zhou 2013-06-14 00:03:58 +02:00
parent fde158df60
commit c555310c2b
16 changed files with 125 additions and 125 deletions

View File

@ -37,10 +37,10 @@ public class VolumeTO implements InternalIdentity {
private long deviceId;
private String chainInfo;
private String guestOsType;
private long bytesReadRate;
private long bytesWriteRate;
private long iopsReadRate;
private long iopsWriteRate;
private Long bytesReadRate;
private Long bytesWriteRate;
private Long iopsReadRate;
private Long iopsWriteRate;
public VolumeTO(long id, Volume.Type type, StoragePoolType poolType, String poolUuid, String name, String mountPoint, String path, long size, String chainInfo) {
this.id = id;
@ -138,35 +138,35 @@ public class VolumeTO implements InternalIdentity {
return new StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString();
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}

View File

@ -53,19 +53,19 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
void setDiskSize(long diskSize);
void setBytesReadRate(long bytesReadRate);
void setBytesReadRate(Long bytesReadRate);
long getBytesReadRate();
Long getBytesReadRate();
void setBytesWriteRate(long bytesWriteRate);
void setBytesWriteRate(Long bytesWriteRate);
long getBytesWriteRate();
Long getBytesWriteRate();
void setIopsReadRate(long iopsReadRate);
void setIopsReadRate(Long iopsReadRate);
long getIopsReadRate();
Long getIopsReadRate();
void setIopsWriteRate(long iopsWriteRate);
void setIopsWriteRate(Long iopsWriteRate);
long getIopsWriteRate();
Long getIopsWriteRate();
}

View File

@ -35,10 +35,10 @@ public class DiskProfile {
private Long templateId;
private long volumeId;
private String path;
private long bytesReadRate;
private long bytesWriteRate;
private long iopsReadRate;
private long iopsWriteRate;
private Long bytesReadRate;
private Long bytesWriteRate;
private Long iopsReadRate;
private Long iopsWriteRate;
private HypervisorType hyperType;
@ -159,35 +159,35 @@ public class DiskProfile {
this.size = size;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}
}

View File

@ -105,19 +105,19 @@ public class CreateDiskOfferingCmd extends BaseCmd {
return domainId;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate;
}

View File

@ -183,19 +183,19 @@ public class CreateServiceOfferingCmd extends BaseCmd {
return params;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : bytesReadRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return (bytesWriteRate == null) || (bytesWriteRate < 0) ? 0 : bytesWriteRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return (iopsReadRate == null) || (iopsReadRate < 0) ? 0 : iopsReadRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return (iopsWriteRate == null) || (iopsWriteRate < 0) ? 0 : iopsWriteRate;
}

View File

@ -162,19 +162,19 @@ public class DiskOfferingResponse extends BaseResponse {
this.storageType = storageType;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
}

View File

@ -261,19 +261,19 @@ public class ServiceOfferingResponse extends BaseResponse {
this.isVolatile = isVolatile;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
}

View File

@ -270,35 +270,35 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
this.storageType = storageType;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}

View File

@ -29,10 +29,10 @@ public class AttachVolumeCommand extends Command {
String volumeName;
Long deviceId;
String chainInfo;
long bytesReadRate;
long bytesWriteRate;
long iopsReadRate;
long iopsWriteRate;
Long bytesReadRate;
Long bytesWriteRate;
Long iopsReadRate;
Long iopsWriteRate;
protected AttachVolumeCommand() {
}
@ -101,35 +101,35 @@ public class AttachVolumeCommand extends Command {
return chainInfo;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}
}

View File

@ -101,16 +101,16 @@ public class DiskOfferingVO implements DiskOffering {
int sortKey;
@Column(name="bytes_read_rate")
long bytesReadRate;
Long bytesReadRate;
@Column(name="bytes_write_rate")
long bytesWriteRate;
Long bytesWriteRate;
@Column(name="iops_read_rate")
long iopsReadRate;
Long iopsReadRate;
@Column(name="iops_write_rate")
long iopsWriteRate;
Long iopsWriteRate;
@Column(name="display_offering")
boolean displayOffering;
@ -340,35 +340,35 @@ public class DiskOfferingVO implements DiskOffering {
this.displayOffering = displayOffering;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}
}

View File

@ -3647,7 +3647,7 @@ ServerResource {
protected synchronized String attachOrDetachDisk(Connect conn,
boolean attach, String vmName, KVMPhysicalDisk attachingDisk,
int devId, long bytesReadRate, long bytesWriteRate, long iopsReadRate, long iopsWriteRate) throws LibvirtException, InternalErrorException {
int devId, Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) throws LibvirtException, InternalErrorException {
List<DiskDef> disks = null;
Domain dm = null;
DiskDef diskdef = null;

View File

@ -592,19 +592,19 @@ public class LibvirtVMDef {
return suffix - 'a';
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
_bytesReadRate = bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
_bytesWriteRate = bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
_iopsReadRate = iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
_iopsWriteRate = iopsWriteRate;
}

View File

@ -65,16 +65,16 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
int sortKey;
@Column(name="bytes_read_rate")
long bytesReadRate;
Long bytesReadRate;
@Column(name="bytes_write_rate")
long bytesWriteRate;
Long bytesWriteRate;
@Column(name="iops_read_rate")
long iopsReadRate;
Long iopsReadRate;
@Column(name="iops_write_rate")
long iopsWriteRate;
Long iopsWriteRate;
@Column(name="type")
Type type;
@ -251,35 +251,35 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
this.type = type;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}

View File

@ -91,16 +91,16 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
int sortKey;
@Column(name="bytes_read_rate")
long bytesReadRate;
Long bytesReadRate;
@Column(name="bytes_write_rate")
long bytesWriteRate;
Long bytesWriteRate;
@Column(name="iops_read_rate")
long iopsReadRate;
Long iopsReadRate;
@Column(name="iops_write_rate")
long iopsWriteRate;
Long iopsWriteRate;
@Column(name=GenericDao.CREATED_COLUMN)
private Date created;
@ -340,35 +340,35 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
this.volatileVm = volatileVm;
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}
}

View File

@ -185,16 +185,16 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
private boolean useLocalStorage;
@Column(name="bytes_read_rate")
long bytesReadRate;
Long bytesReadRate;
@Column(name="bytes_write_rate")
long bytesWriteRate;
Long bytesWriteRate;
@Column(name="iops_read_rate")
long iopsReadRate;
Long iopsReadRate;
@Column(name="iops_write_rate")
long iopsWriteRate;
Long iopsWriteRate;
@Column(name="pool_id")
private long poolId;
@ -754,35 +754,35 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
}
public void setBytesReadRate(long bytesReadRate) {
public void setBytesReadRate(Long bytesReadRate) {
this.bytesReadRate = bytesReadRate;
}
public long getBytesReadRate() {
public Long getBytesReadRate() {
return bytesReadRate;
}
public void setBytesWriteRate(long bytesWriteRate) {
public void setBytesWriteRate(Long bytesWriteRate) {
this.bytesWriteRate = bytesWriteRate;
}
public long getBytesWriteRate() {
public Long getBytesWriteRate() {
return bytesWriteRate;
}
public void setIopsReadRate(long iopsReadRate) {
public void setIopsReadRate(Long iopsReadRate) {
this.iopsReadRate = iopsReadRate;
}
public long getIopsReadRate() {
public Long getIopsReadRate() {
return iopsReadRate;
}
public void setIopsWriteRate(long iopsWriteRate) {
public void setIopsWriteRate(Long iopsWriteRate) {
this.iopsWriteRate = iopsWriteRate;
}
public long getIopsWriteRate() {
public Long getIopsWriteRate() {
return iopsWriteRate;
}

View File

@ -920,16 +920,16 @@ public class DatabaseConfig {
ServiceOfferingVO serviceOffering = new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, ha, displayText, useLocalStorage, false, null, false, null, false);
Long bytesReadRate = Long.parseLong(_currentObjectParams.get("bytesReadRate"));
if (bytesReadRate != null && (bytesReadRate > 0))
if ((bytesReadRate != null) && (bytesReadRate > 0))
serviceOffering.setBytesReadRate(bytesReadRate);
Long bytesWriteRate = Long.parseLong(_currentObjectParams.get("bytesWriteRate"));
if (bytesWriteRate != null && (bytesWriteRate > 0))
if ((bytesWriteRate != null) && (bytesWriteRate > 0))
serviceOffering.setBytesWriteRate(bytesWriteRate);
Long iopsReadRate = Long.parseLong(_currentObjectParams.get("iopsReadRate"));
if (iopsReadRate != null && (iopsReadRate > 0))
if ((iopsReadRate != null) && (iopsReadRate > 0))
serviceOffering.setIopsReadRate(iopsReadRate);
Long iopsWriteRate = Long.parseLong(_currentObjectParams.get("iopsWriteRate"));
if (iopsWriteRate != null && (iopsWriteRate > 0))
if ((iopsWriteRate != null) && (iopsWriteRate > 0))
serviceOffering.setIopsWriteRate(iopsWriteRate);
ServiceOfferingDaoImpl dao = ComponentContext.inject(ServiceOfferingDaoImpl.class);