Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 615 for Acquire (0.06 sec)

  1. src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java

        @Mock
        SmbResource parent;
        @Mock
        ResourceNameFilter nameFilter;
    
        private void stubAcquireReturnsSelf() {
            when(tree.acquire()).thenReturn(tree);
        }
    
        @Test
        @DisplayName("Getters return constructor values and acquire is called")
        void gettersAndAcquire() throws Exception {
            // Arrange
            stubAcquireReturnsSelf();
            String wildcard = "*.*";
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileInputStreamTest.java

            @Test
            @DisplayName("open() acquires handle and closes it")
            void openDelegatesEnsureOpenAndCloses() throws Exception {
                SmbFileInputStream in = newStream();
                in.open();
                // ensureOpen returns acquired handle; try-with-resources must close it
                verify(mockHandle, times(1)).close();
                verify(mockHandle, atLeastOnce()).acquire();
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

            release();
        }
    
        /**
         * @return tree handle with increased usage count
         */
        public SmbTreeHandleImpl acquire() {
            if (this.usageCount.incrementAndGet() == 1) {
                this.treeConnection.acquire();
            }
            return this;
        }
    
        @Override
        public void release() {
            final long us = this.usageCount.decrementAndGet();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbSessionImpl.java

            throw new ClassCastException();
        }
    
        /**
         * @return session increased usage count
         */
        public SmbSessionImpl acquire() {
            long usage = this.usageCount.incrementAndGet();
            if (log.isTraceEnabled()) {
                log.trace("Acquire session " + usage + " " + this);
            }
    
            if (usage == 1) {
                synchronized (this) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 68.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/util/transport/TransportTest.java

        @Nested
        @DisplayName("Resource management tests")
        class ResourceManagementTests {
    
            @Test
            @DisplayName("acquire should increment usage count")
            void shouldIncrementUsageCount() {
                long initial = transport.getUsageCount();
                transport.acquire();
                assertEquals(initial + 1, transport.getUsageCount());
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

         * <p>To avoid races between threads doing release and acquire, we transition to the final state
         * in two steps. One thread will successfully CAS from RUNNING to COMPLETING, that thread will
         * then set the result of the computation, and only then transition to COMPLETED, CANCELLED, or
         * INTERRUPTED.
         *
         * <p>We don't use the integer argument passed between acquire methods so we pass around a -1
         * everywhere.
         */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jan 30 16:59:10 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  7. cmd/lock-rest-server.go

    		return l.makeResp(resp, errLockNotFound)
    	}
    	return l.makeResp(resp, err)
    }
    
    // LockHandler - Acquires a lock.
    func (l *lockRESTServer) LockHandler(args *dsync.LockArgs) (*dsync.LockResp, *grid.RemoteErr) {
    	// Add a timeout similar to what we expect upstream.
    	ctx, cancel := context.WithTimeout(context.Background(), dsync.DefaultTimeouts.Acquire)
    	defer cancel()
    	resp := lockRPCLock.NewResponse()
    	success, err := l.ll.Lock(ctx, *args)
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Jan 31 19:54:34 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

        }
    
        @BeforeEach
        void setup() throws MalformedURLException, CIFSException {
            // Common happy-path defaults
            // Use lenient() to avoid strict stubbing issues with Mockito
            lenient().when(tree.acquire()).thenReturn(tree);
            lenient().when(tree.getConfig()).thenReturn(config);
            lenient().when(config.getListCount()).thenReturn(10);
            lenient().when(config.getListSize()).thenReturn(4096);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbFileOutputStream.java

         */
        protected synchronized SmbFileHandleImpl ensureOpen() throws CIFSException {
            if (!isOpen()) {
                // one extra acquire to keep this open till the stream is released
                this.handle = this.file.openUnshared(this.openFlags, this.access, this.sharing, SmbConstants.ATTR_NORMAL, 0).acquire();
                if (this.append) {
                    this.fp = this.handle.getInitialSize();
                    if (log.isDebugEnabled()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  10. cmd/namespace-lock_test.go

    		// 3) lk3 or lk4 (whichever didn't execute in step 1) then executes and creates
    		//    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)
Back to top