Examples of InitOperation


Examples of com.hazelcast.concurrent.semaphore.operations.InitOperation

                    case DRAIN_OPERATION:
                        return new DrainOperation();
                    case INIT_BACKUP_OPERATION:
                        return new InitBackupOperation();
                    case INIT_OPERATION:
                        return new InitOperation();
                    case REDUCE_BACKUP_OPERATION:
                        return new ReduceBackupOperation();
                    case REDUCE_OPERATION:
                        return new ReduceOperation();
                    case RELEASE_BACKUP_OPERATION:
View Full Code Here

Examples of com.hazelcast.concurrent.semaphore.operations.InitOperation

    }

    @Override
    public boolean init(int permits) {
        isNotNegative(permits, "permits");
        InitOperation operation = new InitOperation(name, permits);
        InternalCompletableFuture<Boolean> future = invoke(operation);
        return future.getSafely();
    }
View Full Code Here

Examples of com.hazelcast.concurrent.semaphore.operations.InitOperation

        super(name, permitCount);
    }

    @Override
    protected Operation prepareOperation() {
        return new InitOperation(name, permitCount);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.semaphore.operations.InitOperation

        super(name, permitCount);
    }

    @Override
    protected Operation prepareOperation() {
        return new InitOperation(name, permitCount);
    }
View Full Code Here

Examples of net.sf.jz3950.protocol.operation.InitOperation

         */
        try
        {
            logger.debug("Initializing association");

            InitOperation initHandler = new InitOperation(this, authenticationMethod);
            requestResponse(initHandler);

            this.targetInformation = initHandler.getTargetInformation();
            this.associationReferenceId = initHandler.getReferenceId();
            logger.debug("Association " + ((this.associationReferenceId == null) ? "" : ("(" + this.associationReferenceId + ") ")) + "initialized (" + this.targetInformation + ")");
        }
        catch (ProtocolException e)
        {
            disconnect("INIT error");
View Full Code Here

Examples of org.syncany.operations.init.InitOperation

public class ConnectOperationTest {
  @Test
  public void testConnectOperationSuccess() throws Exception {
    // A.init()
    InitOperationOptions initOperationOptionsA = TestConfigUtil.createTestInitOperationOptions("A");
    InitOperation initOperationA = new InitOperation(initOperationOptionsA, null);

    InitOperationResult initOperationResultA = initOperationA.execute();

    String connectLinkA = initOperationResultA.getGenLinkResult().getShareLink();
    assertNotNull(connectLinkA);

    // B.connect()
View Full Code Here

Examples of org.syncany.operations.init.InitOperation

  @Test
  public void testConnectOperationFailureNoConnection() throws Exception {
    // A.init()
    InitOperationOptions initOperationOptionsA = TestConfigUtil.createTestInitOperationOptions("A");
    InitOperation initOperationA = new InitOperation(initOperationOptionsA, null);

    InitOperationResult initOperationResultA = initOperationA.execute();

    String connectLinkA = initOperationResultA.getGenLinkResult().getShareLink();
    assertNotNull(connectLinkA);

    // B.connect()
View Full Code Here

Examples of org.syncany.operations.init.InitOperation

  private static final Logger logger = Logger.getLogger(InitOperation.class.getSimpleName());

  @Test
  public void testInitOperation() throws Exception {
    InitOperationOptions operationOptions = TestConfigUtil.createTestInitOperationOptions("A");
    InitOperation op = new InitOperation(operationOptions, null);
    InitOperationResult res = op.execute();
    File repoDir = ((LocalTransferSettings) operationOptions.getConfigTO().getTransferSettings()).getPath();
    File localDir = new File(operationOptions.getLocalDir(), ".syncany");

    // Test the repository
    assertTrue((new File(repoDir, "databases").exists()));
View Full Code Here

Examples of org.syncany.operations.init.InitOperation

  @Test
  public void testFaultyInitOperation() throws Exception {
    // Create an unreliable connection
    List<String> failingOperationsPattern = Lists.newArrayList("rel=1.*op=upload");
    InitOperationOptions operationOptions = TestConfigUtil.createTestUnreliableInitOperationOptions("A", failingOperationsPattern);
    InitOperation op = new InitOperation(operationOptions, null);

    File repoDir = ((UnreliableLocalTransferSettings) operationOptions.getConfigTO().getTransferSettings()).getPath();
    File localDir = new File(operationOptions.getLocalDir(), ".syncany");

    try {
      op.execute();
    }
    catch (StorageException e) {
      logger.log(Level.INFO, "This operation failed because of the unreliable connection.");
    }

View Full Code Here

Examples of org.syncany.operations.init.InitOperation

  public InitOperationResult init(InitOperationOptions options) throws Exception {
    return init(options, null);
  }

  public InitOperationResult init(InitOperationOptions options, UserInteractionListener listener) throws Exception {
    return new InitOperation(options, listener).execute();
  }
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.