Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for startOperation (0.33 sec)

  1. pkg/registry/core/service/portallocator/operation_test.go

    	toAllocate := []int{
    		10000,
    		10030,
    		10030,
    		10040,
    	}
    	expectedErrors := []error{
    		ErrAllocated,
    		nil,
    		ErrAllocated,
    		nil,
    	}
    	op := StartOperation(r, true)
    	for i, port := range toAllocate {
    		err := op.Allocate(port)
    		if err != expectedErrors[i] {
    			t.Errorf("%v: expected error %v but got %v", i, expectedErrors[i], err)
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Aug 15 23:44:12 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/resources/DefaultResourceLockCoordinationService.java

            synchronized (lock) {
                DefaultResourceLockState resourceLockState = new DefaultResourceLockState();
                DefaultResourceLockState previous = startOperation(resourceLockState);
                try {
                    while (true) {
                        ResourceLockState.Disposition disposition;
                        disposition = stateLockAction.transform(resourceLockState);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 17:16:10 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  3. pkg/registry/core/service/portallocator/operation.go

    	shouldRollback  bool
    	dryRun          bool
    }
    
    // Creates a portAllocationOperation, tracking a set of allocations & releases
    // If dryRun is specified, never actually allocate or release anything
    func StartOperation(pa Interface, dryRun bool) *PortAllocationOperation {
    	op := &PortAllocationOperation{}
    	op.pa = pa
    	op.allocated = []int{}
    	op.releaseDeferred = []int{}
    	op.shouldRollback = true
    	op.dryRun = dryRun
    	return op
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  4. pkg/registry/core/service/storage/alloc.go

    	}
    
    	return released, nil
    }
    
    func (al *Allocators) txnAllocNodePorts(service *api.Service, dryRun bool) (transaction, error) {
    	// The allocator tracks dry-run-ness internally.
    	nodePortOp := portallocator.StartOperation(al.serviceNodePorts, dryRun)
    
    	txn := callbackTransaction{
    		commit: func() {
    			nodePortOp.Commit()
    			// We don't NEED to call Finish() here, but for that package says
    			// to, so for future-safety, we will.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
Back to top