Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for Smb2LeaseKey (0.14 sec)

  1. src/main/java/jcifs/internal/smb2/lease/Smb2LeaseKey.java

     * MS-SMB2 2.2.13.2.8
     */
    public class Smb2LeaseKey {
    
        private final byte[] key;
        private static final SecureRandom RANDOM = new SecureRandom();
        private static final int LEASE_KEY_SIZE = 16;
    
        /**
         * Create a new random lease key
         */
        public Smb2LeaseKey() {
            this.key = new byte[LEASE_KEY_SIZE];
            RANDOM.nextBytes(this.key);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 00:16:17 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseContextTest.java

        public void testGetName() {
            Smb2LeaseKey key = new Smb2LeaseKey();
            DirectoryLeaseContext context = new DirectoryLeaseContext(key, 0, DirectoryCacheScope.IMMEDIATE_CHILDREN);
    
            byte[] name = context.getName();
            assertNotNull(name);
            assertEquals("DLse", new String(name));
        }
    
        @Test
        public void testSettersAndGetters() {
            Smb2LeaseKey key1 = new Smb2LeaseKey();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/lease/LeaseManager.java

     */
    public class LeaseManager {
    
        private static final Logger log = LoggerFactory.getLogger(LeaseManager.class);
    
        private final ConcurrentHashMap<Smb2LeaseKey, LeaseEntry> leases;
        private final ConcurrentHashMap<String, Smb2LeaseKey> pathToLease;
        private final ConcurrentHashMap<String, WeakReference<SmbFile>> fileCache;
        private final ReadWriteLock lock;
        private final CIFSContext context;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  4. docs/smb3-features/01-smb3-lease-design.md

    import org.junit.Test;
    import static org.junit.Assert.*;
    
    public class LeaseTest {
        
        @Test
        public void testLeaseKeyGeneration() {
            Smb2LeaseKey key1 = new Smb2LeaseKey();
            Smb2LeaseKey key2 = new Smb2LeaseKey();
            
            assertNotNull(key1.getKey());
            assertEquals(16, key1.getKey().length);
            assertFalse(Arrays.equals(key1.getKey(), key2.getKey()));
        }
        
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 22K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/lease/Smb2LeaseKeyTest.java

            Smb2LeaseKey key1 = new Smb2LeaseKey(testBytes1);
            Smb2LeaseKey key2 = new Smb2LeaseKey(testBytes2);
    
            assertEquals(key1.hashCode(), key2.hashCode());
        }
    
        @Test
        @DisplayName("Should generate different random keys")
        void testRandomKeyUniqueness() {
            Smb2LeaseKey key1 = new Smb2LeaseKey();
            Smb2LeaseKey key2 = new Smb2LeaseKey();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 00:16:17 UTC 2025
    - 6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java

            String dir1 = "/test/dir1";
            String dir2 = "/test/dir2";
            String dir3 = "/test/dir3";
    
            Smb2LeaseKey key1 = new Smb2LeaseKey();
            Smb2LeaseKey key2 = new Smb2LeaseKey();
            Smb2LeaseKey key3 = new Smb2LeaseKey();
    
            when(baseLeaseManager.requestLease(dir1, DirectoryLeaseState.DIRECTORY_READ_HANDLE)).thenReturn(key1);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/create/LeaseV1CreateContextRequest.java

        private static final byte[] CONTEXT_NAME_BYTES = CONTEXT_NAME.getBytes();
    
        private Smb2LeaseKey leaseKey;
        private int leaseState;
        private int leaseFlags;
    
        /**
         * Create a new lease V1 context request
         */
        public LeaseV1CreateContextRequest() {
            this.leaseKey = new Smb2LeaseKey();
            this.leaseState = 0;
            this.leaseFlags = 0;
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/lease/LeaseManagerTest.java

        void testReuseExistingLease() {
            String path = "/share/file.txt";
            int requestedState = Smb2LeaseState.SMB2_LEASE_READ_WRITE;
    
            Smb2LeaseKey key1 = leaseManager.requestLease(path, requestedState);
            Smb2LeaseKey key2 = leaseManager.requestLease(path, requestedState);
    
            assertEquals(key1, key2);
        }
    
        @Test
        @DisplayName("Should update lease state")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 00:16:17 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/create/LeaseV2CreateContextRequest.java

        private Smb2LeaseKey leaseKey;
        private int leaseState;
        private int leaseFlags;
        private Smb2LeaseKey parentLeaseKey;
        private int epoch;
    
        /**
         * Create a new lease V2 context request
         */
        public LeaseV2CreateContextRequest() {
            this.leaseKey = new Smb2LeaseKey();
            this.parentLeaseKey = new Smb2LeaseKey(new byte[16]); // Zero parent key by default
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/create/LeaseV2CreateContextResponse.java

         */
        public static final String CONTEXT_NAME = "RqL2";
    
        private static final byte[] CONTEXT_NAME_BYTES = CONTEXT_NAME.getBytes();
    
        private Smb2LeaseKey leaseKey;
        private int leaseState;
        private int leaseFlags;
        private Smb2LeaseKey parentLeaseKey;
        private int epoch;
    
        /**
         * Create a new lease V2 context response
         */
        public LeaseV2CreateContextResponse() {
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 3.6K bytes
    - Viewed (0)
Back to top