Examples of OperationStatus


Examples of com.alibaba.wasp.fserver.OperationStatus

        }
        QueryResult queryResult = new QueryResult(resultMap);
        results.add(queryResult);
      } else {
        ClientProtos.WriteResultProto writeResultProto = result.getWriteResult();
        OperationStatus status = new OperationStatus(
            OperationStatusCode.valueOf(writeResultProto.getCode().name()),
            writeResultProto.getExceptionMsg(),
            writeResultProto.getExceptionClassName());
        WriteResult writeResult = new WriteResult(status);
        results.add(writeResult);
View Full Code Here

Examples of com.cumulocity.me.model.operation.OperationStatus

        toSend.setAttrs(operation.getAttrs());
        return toSend;
    }

    public PagedCollectionResource getOperationsByFilter(OperationFilter filter) throws SDKException {
        OperationStatus status = filter.getStatus();
        String device = filter.getDevice();
        String agent = filter.getAgent();

        if (status != null && agent != null && device != null) {
            throw new IllegalArgumentException();
View Full Code Here

Examples of com.cumulocity.model.operation.OperationStatus

public class OperationFilterTest {
    @Test
    public void shouldHaveStatusAndDeviceAndAgent() throws Exception {
        // Given
        OperationStatus status = OperationStatus.EXECUTING;
        String deviceId = "deviceId";
        String agentId = "agentId";

        //When
        OperationFilter filter = new OperationFilter().byStatus(status).byDevice(deviceId).byAgent(agentId);

        //Then
        assertThat(filter.getStatus(), is(status.toString()));
        assertThat(filter.getDevice(), is(deviceId));
        assertThat(filter.getAgent(), is(agentId));
    }
View Full Code Here

Examples of com.microsoft.windowsazure.core.OperationStatus

                    result.setId(idInstance);
                }
               
                Element statusElement = XmlUtility.getElementByTagNameNS(operationElement, "http://schemas.microsoft.com/windowsazure", "Status");
                if (statusElement != null) {
                    OperationStatus statusInstance;
                    statusInstance = OperationStatus.valueOf(statusElement.getTextContent());
                    result.setStatus(statusInstance);
                }
               
                Element httpStatusCodeElement = XmlUtility.getElementByTagNameNS(operationElement, "http://schemas.microsoft.com/windowsazure", "HttpStatusCode");
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    /** {@inheritDoc} */
    public byte[] get(DbTransaction txn, byte[] key, boolean forUpdate) {
  try {
      DatabaseEntry valueEntry = new DatabaseEntry();
      OperationStatus status = db.get(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key),
    valueEntry, forUpdate ? LockMode.RMW : null);
      if (status == SUCCESS) {
    return convertData(valueEntry.getData());
      } else if (status == NOTFOUND) {
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    public void markForUpdate(DbTransaction txn, byte[] key) {
  try {
      DatabaseEntry valueEntry = new DatabaseEntry();
      /* Ignore value by truncating to zero bytes */
      valueEntry.setPartial(0, 0, true);
      OperationStatus status = db.get(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key),
    valueEntry, LockMode.RMW);
      if (status != SUCCESS && status != NOTFOUND) {
    throw new DbDatabaseException("Operation failed: " + status);
      }
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    }

    /** {@inheritDoc} */
    public void put(DbTransaction txn, byte[] key, byte[] value) {
  try {
      OperationStatus status = db.put(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key),
    new DatabaseEntry(value));
      if (status != SUCCESS) {
    throw new DbDatabaseException("Operation failed: " + status);
      }
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    /** {@inheritDoc} */
    public boolean putNoOverwrite(
  DbTransaction txn, byte[] key, byte[] value)
    {
  try {
      OperationStatus status = db.putNoOverwrite(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key),
    new DatabaseEntry(value));
      if (status == SUCCESS) {
    return true;
      } else if (status == KEYEXIST) {
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    }

    /** {@inheritDoc} */
    public boolean delete(DbTransaction txn, byte[] key) {
  try {
      OperationStatus status = db.delete(
    BdbTransaction.getBdbTxn(txn), new DatabaseEntry(key));
      if (status == SUCCESS) {
    return true;
      } else if (status == NOTFOUND) {
    return false;
View Full Code Here

Examples of com.sleepycat.db.OperationStatus

    }

    /** {@inheritDoc} */
    public boolean findFirst() {
  try {
      OperationStatus status =
    cursor.getFirst(keyEntry, valueEntry, null);
      if (status == SUCCESS) {
    isCurrent = true;
    return true;
      } else if (status == NOTFOUND) {
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.