Project

General

Profile

Statistics
| Revision:

sdis1819-t7g02 / service / Constants.java @ 1

History | View | Annotate | Download (1.2 KB)

1
package service;
2

    
3
public class Constants {
4
        public static final int MAX_CHUNK_SIZE = 64 * 1000;
5
        public static final int MAX_MESSAGE_SIZE = MAX_CHUNK_SIZE + 1024;
6
        public static final String CHUNKS_DIR = "../Project 1 -- Distributed Backup Service/peers/peer";
7
        public static final String DATABASE_DIR = "../Project 1 -- Distributed Backup Service/database/";
8
        public static final int MAX_NUMBER_OF_THREADS = 8;
9
        public static final String NORMAL_VERSION = "1.0";
10
        
11
        // Available header types
12
        public static final String PUTCHUNK = "PUTCHUNK";
13
        public static final String STORED = "STORED";
14
        public static final String GETCHUNK = "GETCHUNK";
15
        public static final String CHUNK = "CHUNK";
16
        public static final String DELETE = "DELETE";
17
        public static final String REMOVED = "REMOVED";
18
        
19
        
20
        // headers necessary arguments
21
        
22
        public static final int PUTCHUNK_N_ARGS = 6;
23
        public static final int STORED_N_ARGS = 5;
24
        public static final int GETCHUNK_N_ARGS = 5;
25
        public static final int CHUNK_N_ARGS = 5;
26
        public static final int DELETE_N_ARGS = 4;
27
        public static final int REMOVED_N_ARGS = 5;
28
        
29
        //'0xD''0xA'
30
        public static final byte CR = 0xD;
31
        public static final byte LF = 0xA;
32
        
33
        public static final int MAX_PUTCHUNK_MESSAGES = 5;
34
}