Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for FileLockPacketPayload (0.39 sec)

  1. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/locklistener/FileLockPacketPayload.java

    import java.io.DataOutputStream;
    import java.io.EOFException;
    import java.io.IOException;
    
    import static org.gradle.cache.internal.locklistener.FileLockPacketType.UNKNOWN;
    
    public class FileLockPacketPayload {
    
        public static final int MAX_BYTES = 1 + 8 + 1; // protocolVersion + lockId + type
        private static final byte PROTOCOL_VERSION = 1;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/locklistener/FileLockPacketPayloadTest.groovy

        def "encodes lock id and type"() {
            when:
            def bytes = FileLockPacketPayload.encode(42, LOCK_RELEASE_CONFIRMATION)
    
            then:
            bytes.length == FileLockPacketPayload.MAX_BYTES
            bytes == [1, 0, 0, 0, 0, 0, 0, 0, 42, 3] as byte[]
        }
    
        def "decodes payloads without type"() {
            when:
            def payload = FileLockPacketPayload.decode([1, 0, 0, 0, 0, 0, 0, 0, 42, 1] as byte[], 9)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/locklistener/FileLockCommunicator.java

                }
                throw new GracefullyStoppedException();
            }
        }
    
        public FileLockPacketPayload decode(DatagramPacket receivedPacket) {
            try {
                return FileLockPacketPayload.decode(receivedPacket.getData(), receivedPacket.getLength());
            } catch (IOException e) {
                if (!stopped) {
                    throw new RuntimeException(e);
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:49 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/locklistener/FileLockCommunicatorTest.groovy

        def "does not know port after stopping"() {
            when:
            communicator.stop()
    
            then:
            communicator.getPort() == -1
        }
    
        def "can receive lock id and type"() {
            FileLockPacketPayload receivedPayload
    
            start {
                def packet = communicator.receive()
                receivedPayload = communicator.decode(packet)
            }
    
            poll {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:49 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/locklistener/DefaultFileLockContentionHandler.java

                    }
                }
    
                private void doRun() {
                    while (true) {
                        DatagramPacket packet;
                        FileLockPacketPayload payload;
                        try {
                            packet = communicator.receive();
                            payload = communicator.decode(packet);
                        } catch (GracefullyStoppedException e) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  6. testing/architecture-test/src/changes/archunit-store/internal-api-nullability.txt

    Class <org.gradle.cache.internal.locklistener.FileLockPacketPayload> is not annotated (directly or via its package) with @org.gradle.api.NonNullApi in (FileLockPacketPayload.java:0)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 11 09:51:15 UTC 2024
    - 967.9K bytes
    - Viewed (0)
Back to top