Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for Locks (0.02 sec)

  1. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

            void testSizeWithVariousLockCounts(int lockCount) {
                Smb2Lock[] locks = new Smb2Lock[lockCount];
                for (int i = 0; i < lockCount; i++) {
                    locks[i] = new Smb2Lock(i * 100L, 100L, Smb2Lock.SMB2_LOCKFLAG_EXCLUSIVE_LOCK);
                }
                Smb2LockRequest req = new Smb2LockRequest(mockConfig, testFileId, locks);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  2. cmd/local-locker_test.go

    	rng := rand.New(rand.NewSource(0))
    	quorum := 0
    	// Numbers of unique locks
    	for _, locks := range []int{100, 1000, 1e6} {
    		if testing.Short() && locks > 100 {
    			continue
    		}
    		t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) {
    			// Number of readers per lock...
    			for _, readers := range []int{1, 10, 100} {
    				if locks > 1000 && readers > 1 {
    					continue
    				}
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/lock/Smb2LockRequest.java

         * @param fileId the file identifier for the file to lock
         * @param locks the array of lock elements to apply
         */
        public Smb2LockRequest(final Configuration config, final byte[] fileId, final Smb2Lock[] locks) {
            super(config, SMB2_LOCK);
            this.fileId = fileId;
            this.locks = locks;
        }
    
        /**
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb1/com/SmbComLockingAndX.java

                bufferIndex += this.unlocks[i].decode(buffer, bufferIndex, buffer.length);
            }
    
            for (int i = 0; i < this.locks.length; i++) {
                this.locks[i] = createLockRange();
                bufferIndex += this.locks[i].decode(buffer, bufferIndex, buffer.length);
            }
    
            return start - bufferIndex;
        }
    
        /**
         * @return
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/com/SmbComLockingAndXTest.java

            LockingAndXRange unlock = new LockingAndXRange(false);
            setField(unlock, "pid", 456);
            setField(unlock, "byteOffset", 300L);
            setField(unlock, "lengthInBytes", 400L);
            setField(cmd, "locks", new LockingAndXRange[] { lock });
            setField(cmd, "unlocks", new LockingAndXRange[] { unlock });
            setField(cmd, "largeFile", false);
    
            byte[] buffer = new byte[20];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  6. cmd/local-locker.go

    	}
    	// Wait for mutex
    	defer l.getMutex()()
    	if ctx.Err() != nil {
    		return false, ctx.Err()
    	}
    	if !l.canTakeLock(args.Resources...) {
    		// Not all locks can be taken on resources,
    		// reject it completely.
    		return false, nil
    	}
    
    	// No locks held on the all resources, so claim write
    	// lock on all resources at once.
    	now := UTCNow()
    	for i, resource := range args.Resources {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 12K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/lock/Smb2LockResponse.java

    import jcifs.internal.smb2.ServerMessageBlock2Response;
    import jcifs.internal.util.SMBUtil;
    
    /**
     * SMB2 Lock response message. This response acknowledges the successful
     * acquisition or release of byte-range locks.
     *
     * @author mbechler
     *
     */
    public class Smb2LockResponse extends ServerMessageBlock2Response {
    
        /**
         * Constructs an SMB2 lock response with the given configuration.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/lease/DirectoryCacheEntry.java

    import java.util.ArrayList;
    import java.util.List;
    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.locks.ReadWriteLock;
    import java.util.concurrent.locks.ReentrantReadWriteLock;
    
    /**
     * Cache entry for directory contents with thread-safe operations
     */
    public class DirectoryCacheEntry {
    
        private final String directoryPath;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  9. cmd/namespace-lock_test.go

    		//    a new entry in lockMap and acquires a lock for the same resource.
    
    		<-lk2ch
    		lk3ok := <-lk3ch
    		lk4ok := <-lk4ch
    
    		if lk3ok && lk4ok {
    			t.Fatalf("multiple locks acquired; iteration=%d, lk3=%t, lk4=%t", i, lk3ok, lk4ok)
    		}
    	}
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. cmd/admin-handlers_test.go

    			UID:    uuid,
    			Owner:  owners[i%len(owners)],
    			Group:  true,
    			Quorum: 3,
    		}
    		lris = append(lris, lri)
    		locksHeld[resource] = []lockRequesterInfo{lri}
    	}
    
    	// Add a few concurrent read locks to the mix
    	for i := range 50 {
    		resource := fmt.Sprintf("bucket/get-object-%d", i)
    		lri := lockRequesterInfo{
    			Name:   resource,
    			UID:    mustGetUUID(),
    			Owner:  owners[i%len(owners)],
    			Quorum: 2,
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 13.9K bytes
    - Viewed (0)
Back to top