Skip to content

Commit

Permalink
Update TODOs
Browse files Browse the repository at this point in the history
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
  • Loading branch information
manoelcampos committed Nov 4, 2022
1 parent 5feeab6 commit ee3429e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ private void notifyOnVmsCreatedListeners() {
return;
}

//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onVmsCreatedListeners.size(); i++) {
final var listener = onVmsCreatedListeners.get(i);
listener.update(DatacenterBrokerEventInfo.of(listener, this));
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/cloudbus/cloudsim/vms/VmSimple.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ public final void setInMigration(final boolean migrating) {
* @param targetHost the Host the VM is migrating to
*/
public void updateMigrationStartListeners(final Host targetHost){
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onMigrationStartListeners.size(); i++) {
final var listener = onMigrationStartListeners.get(i);
listener.update(VmHostEventInfo.of(listener, this, targetHost));
Expand All @@ -676,7 +676,7 @@ public void updateMigrationStartListeners(final Host targetHost){
* @param targetHost the Host the VM has just migrated to
*/
public void updateMigrationFinishListeners(final Host targetHost){
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onMigrationFinishListeners.size(); i++) {
final var listener = onMigrationFinishListeners.get(i);
listener.update(VmHostEventInfo.of(listener, this, targetHost));
Expand Down Expand Up @@ -884,7 +884,7 @@ public boolean isDelayed() {

@Override
public void notifyOnHostAllocationListeners() {
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onHostAllocationListeners.size(); i++) {
final var listener = onHostAllocationListeners.get(i);
listener.update(VmHostEventInfo.of(listener, this));
Expand All @@ -894,7 +894,7 @@ public void notifyOnHostAllocationListeners() {
@Override
public void notifyOnHostDeallocationListeners(final Host deallocatedHost) {
requireNonNull(deallocatedHost);
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onHostDeallocationListeners.size(); i++) {
final var listener = onHostDeallocationListeners.get(i);
listener.update(VmHostEventInfo.of(listener, this, deallocatedHost));
Expand All @@ -905,7 +905,7 @@ public void notifyOnHostDeallocationListeners(final Host deallocatedHost) {
* Notifies all registered listeners when the processing of the Vm is updated in its {@link Host}.
*/
public void notifyOnUpdateProcessingListeners() {
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onUpdateProcessingListeners.size(); i++) {
final var listener = onUpdateProcessingListeners.get(i);
listener.update(VmHostEventInfo.of(listener, this));
Expand All @@ -915,7 +915,7 @@ public void notifyOnUpdateProcessingListeners() {
@Override
public void notifyOnCreationFailureListeners(final Datacenter failedDatacenter) {
requireNonNull(failedDatacenter);
//Uses indexed for to avoid ConcurrentModificationException
// TODO: Workaround - Uses indexed for to avoid ConcurrentModificationException
for (int i = 0; i < onCreationFailureListeners.size(); i++) {
final var listener = onCreationFailureListeners.get(i);
listener.update(VmDatacenterEventInfo.of(listener, this, failedDatacenter));
Expand Down

0 comments on commit ee3429e

Please sign in to comment.