Examples of update()


Examples of org.apache.camel.management.mbean.LoadTriplet.update()

public class LoadTripletTest extends TestCase {

    public void testConstantUpdate() {
        LoadTriplet t = new LoadTriplet();
        t.update(1);
        assertEquals(1.0, t.getLoad1(), Math.ulp(1.0) * 5);
        assertEquals(1.0, t.getLoad5(), Math.ulp(1.0) * 5);
        assertEquals(1.0, t.getLoad15(), Math.ulp(1.0) * 5);
        for (int i = 0; i < 100; i++) {
            t.update(1);
View Full Code Here

Examples of org.apache.cassandra.locator.TokenMetadata.update()

        for (int i = 1; i <= numOldNodes; i++)
        {
            // leave .1 for myEndpoint
            // TODO use this when #519 is fixed
            // tmd.update(p.getRandomToken(), InetAddress.getByName("127.0.0." + (i + 1)));
            tmd.update(p.getToken(FBUtilities.bytesToHex(FBUtilities.toByteArray(i * 13))), InetAddress.getByName("127.0.0." + (i + 1)));
        }
    }
}
View Full Code Here

Examples of org.apache.cassandra.utils.PureJavaCrc32.update()

        markDirty(rowMutation, repPos);

        Checksum checksum = new PureJavaCrc32();
        byte[] serializedRow = rowMutation.getSerializedBuffer(MessagingService.current_version);

        checksum.update(serializedRow.length);
        buffer.putInt(serializedRow.length);
        buffer.putLong(checksum.getValue());

        buffer.put(serializedRow);
        checksum.update(serializedRow, 0, serializedRow.length);
View Full Code Here

Examples of org.apache.cassandra.utils.StreamingHistogram.update()

                    atom = ((CounterColumn) atom).markDeltaToBeCleared();

                int deletionTime = atom.getLocalDeletionTime();
                if (deletionTime < Integer.MAX_VALUE)
                {
                    tombstones.update(deletionTime);
                }
                minTimestamp = Math.min(minTimestamp, atom.minTimestamp());
                maxTimestamp = Math.max(maxTimestamp, atom.maxTimestamp());
                minColumnNames = ColumnNameHelper.minComponents(minColumnNames, atom.name(), metadata.comparator);
                maxColumnNames = ColumnNameHelper.maxComponents(maxColumnNames, atom.name(), metadata.comparator);
View Full Code Here

Examples of org.apache.catalina.authenticator.SingleSignOn.update()

      }
      else
      {
         // Update the SSO session with the latest authentication data
         sso.update(ssoId, principal, AUTH_TYPE, username, this.getPasswordAsString(password));
      }

      // Always associate a session with a new SSO reqistration.
      // SSO entries are only removed from the SSO registry map when
      // associated sessions are destroyed; if a new SSO entry is created
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.TableHelper.update()

                "SALARY",
                "CLIENT_COMPANY_ID",
                "DEPARTMENT_ID");

        // manually break circular deps
        tPerson.update().set("DEPARTMENT_ID", null, Types.INTEGER).execute();

        dbHelper.deleteAll("ADDRESS");
        dbHelper.deleteAll("DEPARTMENT");
        dbHelper.deleteAll("PERSON_NOTES");
        dbHelper.deleteAll("PERSON");
View Full Code Here

Examples of org.apache.cloudstack.network.contrail.model.FloatingIpModel.update()

        if (fipModel == null) {
            fipModel = new FloatingIpModel(ip.getUuid());
            fipModel.addToFloatingIpPool(fipPoolModel);
            fipModel.build(getModelController(), ip);
            try {
                fipModel.update(getModelController());
            } catch (Exception ex) {
                s_logger.warn("floating-ip create: ", ex);
                return false;
            }
        }
View Full Code Here

Examples of org.apache.cloudstack.network.contrail.model.FloatingIpPoolModel.update()

        if (fipPoolModel == null) {
            fipPoolModel = new FloatingIpPoolModel();
            fipPoolModel.addToVirtualNetwork(vnModel);
            fipPoolModel.build(getModelController());
            try {
                fipPoolModel.update(getModelController());
                vnModel.setFipPoolModel(fipPoolModel);
            } catch (Exception ex) {
                s_logger.warn("floating-ip-pool create: ", ex);
                return false;
            }
View Full Code Here

Examples of org.apache.cloudstack.network.contrail.model.NetworkPolicyModel.update()

        }

        if (_rwMode) {
            try {
                if (!policyModel.verify(_manager.getModelController())) {
                    policyModel.update(_manager.getModelController());
                }
            } catch (Exception ex) {
                s_logger.warn("create network-policy", ex);
                syncLogMesg.append("Error: Policy# VNC : Unable to create network policy " +
                    db.getName() + "\n");
View Full Code Here

Examples of org.apache.cloudstack.network.contrail.model.ServiceInstanceModel.update()

        // 1. Create service-instance.
        ServiceInstanceModel serviceModel = new ServiceInstanceModel(project, name, template, serviceOffering,
                leftModel, rightModel);

        try {
            serviceModel.update(_manager.getModelController());
        } catch (Exception ex) {
            s_logger.warn("service-instance update", ex);
            throw new CloudRuntimeException(ex);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.