Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
d85ce245
Commit
d85ce245
authored
Jan 24, 2020
by
Andre Freyssinet
Browse files
Allows to fix a destination in memory, it forces the preload during
server initialization (JORAM-358).
parent
b5c5769c
Changes
2
Hide whitespace changes
Inline
Side-by-side
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/Destination.java
View file @
d85ce245
...
...
@@ -410,10 +410,18 @@ public abstract class Destination extends Agent implements DestinationMBean {
logger
.
log
(
BasicLevel
.
ERROR
,
this
+
": error setting destination period"
,
e
);
}
}
boolean
fixedInMemory
=
false
;
if
(
prop
!=
null
&&
prop
.
containsKey
(
DestinationConstants
.
FIXED_IN_MEMORY
))
fixedInMemory
=
ConversionHelper
.
toBoolean
(
prop
.
get
(
DestinationConstants
.
FIXED_IN_MEMORY
));
if
(
firstTime
)
{
period
=
newPeriod
;
fixed
=
fixedInMemory
;
}
else
{
setPeriod
(
newPeriod
);
if
(
fixedInMemory
)
logger
.
log
(
BasicLevel
.
ERROR
,
this
+
": cannot fix already created destination in memory."
);
}
interceptorsProp
=
null
;
...
...
joram/joram/shared/src/main/java/org/objectweb/joram/shared/DestinationConstants.java
View file @
d85ce245
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2009 - 20
19
ScalAgent Distributed Technologies
* Copyright (C) 2009 - 20
20
ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -35,6 +35,12 @@ public final class DestinationConstants {
public
static
final
String
REDELIVERY_DELAY
=
"redeliveryDelay"
;
public
static
final
String
DELIVERY_DELAY
=
"deliveryDelay"
;
/**
* Name of property allowing to force the destination to be always in memory.
* By side effect the destination is pre-loaded during server initialization.
*/
public
static
final
String
FIXED_IN_MEMORY
=
"fixedInMemory"
;
/** The property name for the distribution handler class name. */
public
static
final
String
DISTRIBUTION_CLASS_NAME
=
"distribution.className"
;
/** */
...
...
Write
Preview
Supports
Markdown
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