Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for BufferCache (0.3 sec)

  1. src/main/java/jcifs/smb1/smb1/BufferCache.java

     * - Uses ConcurrentLinkedQueue for O(1) operations
     * - Lock-free operations for better concurrency
     * - Proper buffer validation and limits
     */
    public class BufferCache {
    
        /**
         * Private constructor to prevent instantiation of this utility class.
         */
        private BufferCache() {
            // Utility class - not instantiable
        }
    
        private static final int MAX_BUFFERS = Config.getInt("jcifs.smb1.smb.maxBuffers", 16);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  2. src/main/java/jcifs/BufferCache.java

     */
    package jcifs;
    
    /**
     * Internal API for managing reusable buffers
     *
     * @author mbechler
     *
     * <p>This interface is intended for internal use.</p>
     */
    public interface BufferCache {
    
        /**
         * Gets a buffer from the cache or creates a new one if the cache is empty.
         *
         * @return a buffer from the cache, or a new one
         */
        byte[] getBuffer();
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/BufferCacheSecurityTest.java

            assertDoesNotThrow(() -> {
                BufferCache.releaseBuffer(tooSmall);
                BufferCache.releaseBuffer(tooLarge);
                BufferCache.releaseBuffer(empty);
            });
    
            // Then - Invalid buffers should be silently ignored
            // Get a new buffer to verify cache still works
            byte[] validBuffer = BufferCache.getBuffer();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/BufferCacheImpl.java

     */
    
    package jcifs.smb;
    
    import java.util.Arrays;
    
    import jcifs.BufferCache;
    import jcifs.Configuration;
    
    /**
     * Cache for reusable byte buffers
     *
     *
     * <p>This class is intended for internal use.</p>
     */
    public class BufferCacheImpl implements BufferCache {
    
        private final Object[] cache;
        private final int bufferSize;
        private int freeBuffers = 0;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/BufferCacheTest.java

    import org.junit.jupiter.api.Test;
    import org.mockito.Mock;
    
    /**
     * Comprehensive test suite for BufferCache interface.
     * Tests the contract and behavior of BufferCache implementations.
     */
    @DisplayName("BufferCache Interface Tests")
    class BufferCacheTest extends BaseTest {
    
        @Mock
        private BufferCache mockBufferCache;
    
        private TestBufferCacheImpl testCache;
    
        @BeforeEach
        void setUp() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/context/BaseContext.java

        private final DfsResolver dfs;
        private final SidResolver sidResolver;
        private final Handler urlHandler;
        private final NameServiceClient nameServiceClient;
        private final BufferCache bufferCache;
        private final SmbTransportPool transportPool;
        private final CredentialsInternal defaultCredentials;
    
        /**
         * Construct a context
         *
         * @param config
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  7. src/test/java/jcifs/context/AbstractCIFSContextTest.java

    import java.net.URLStreamHandler;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.Test;
    import org.mockito.Mock;
    import org.mockito.MockitoAnnotations;
    
    import jcifs.BufferCache;
    import jcifs.CIFSContext;
    import jcifs.CIFSException;
    import jcifs.Configuration;
    import jcifs.Credentials;
    import jcifs.DfsResolver;
    import jcifs.NameServiceClient;
    import jcifs.SidResolver;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/CIFSContextTest.java

            verify(mockContext).getNameServiceClient();
        }
    
        @Test
        @DisplayName("Should get BufferCache")
        void testGetBufferCache() {
            // Given
            BufferCache mockCache = mock(BufferCache.class);
            when(mockContext.getBufferCache()).thenReturn(mockCache);
    
            // When
            BufferCache cache = mockContext.getBufferCache();
    
            // Then
            assertEquals(mockCache, cache);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/context/CIFSContextWrapper.java

     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    package jcifs.context;
    
    import java.net.MalformedURLException;
    import java.net.URLStreamHandler;
    
    import jcifs.BufferCache;
    import jcifs.CIFSContext;
    import jcifs.CIFSException;
    import jcifs.Configuration;
    import jcifs.Credentials;
    import jcifs.DfsResolver;
    import jcifs.NameServiceClient;
    import jcifs.SidResolver;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  10. src/main/java/jcifs/CIFSContext.java

         */
        NameServiceClient getNameServiceClient();
    
        /**
         * Get the buffer cache for efficient memory management
         *
         * @return the buffer cache
         */
        BufferCache getBufferCache();
    
        /**
         * Get the transport pool for managing SMB connections
         *
         * @return the transport pool
         */
        SmbTransportPool getTransportPool();
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.9K bytes
    - Viewed (0)
Back to top