Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
K
key_value-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amir.yosef
key_value-server
Commits
62cf7a72
Commit
62cf7a72
authored
Aug 20, 2024
by
amir.yosef
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
cddb4a54
f2cfa68b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
Main.java
src/Main.java
+1
-1
SendToReplica.java
src/server/SendToReplica.java
+4
-5
ServerBuilder.java
src/server/ServerBuilder.java
+1
-1
RdbFileInfo.java
src/util/RdbFileInfo.java
+1
-1
No files found.
src/Main.java
View file @
62cf7a72
src/server/SendToReplica.java
View file @
62cf7a72
...
...
@@ -47,10 +47,10 @@ public class SendToReplica implements Closeable {
byte
[]
commandBytes
=
command
.
getBytes
();
connectedReplicas
.
forEach
(
replica
->
{
try
{
try
(
OutputStream
outputStream
=
replica
.
os
())
{
OutputStream
outputStream
=
replica
.
os
();
outputStream
.
write
(
commandBytes
);
outputStream
.
flush
();
}
}
catch
(
IOException
e
)
{
logger
.
log
(
Level
.
SEVERE
,
"Failed to send command to replica "
,
e
);
}
...
...
@@ -67,7 +67,6 @@ public class SendToReplica implements Closeable {
}
public
void
addConnection
(
OutputStream
outputStream
)
{
connectedReplicas
.
add
(
new
ConnectedReplica
(
outputStream
));
logger
.
info
(
"SIZE CONNECTED REPLICAS = "
+
connectedReplicas
.
size
());
...
...
src/server/ServerBuilder.java
View file @
62cf7a72
...
...
@@ -8,7 +8,7 @@ import java.util.Map;
import
java.util.Optional
;
public
class
ServerBuilder
{
private
int
port
=
163
80
;
private
int
port
=
163
79
;
private
String
role
;
private
final
String
[]
masterPortAndHost
;
private
final
static
ServerInfo
info
=
ServerInfo
.
getInstance
();
...
...
src/util/RdbFileInfo.java
View file @
62cf7a72
...
...
@@ -51,7 +51,7 @@ public class RdbFileInfo {
}
public
void
setFile
(
Map
<
String
,
String
>
parameters
)
{
String
path
=
"C:\\Users\\Amir\\Desktop\\
Projects\\Redis\\tmp
"
;
String
path
=
"C:\\Users\\Amir\\Desktop\\
Games\\Redis\\tmp\\
"
;
String
fileName
=
"rdb.rdb"
;
out
.
println
(
parameters
);
if
(
parameters
.
containsKey
(
"--dir"
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment