Revision 07322062 src/main/scala/gr/grnet/aquarium/store/LocalFSEventStore.scala
b/src/main/scala/gr/grnet/aquarium/store/LocalFSEventStore.scala | ||
---|---|---|
101 | 101 |
writeToFile(file, jsonPayload, appendString) |
102 | 102 |
} |
103 | 103 |
|
104 |
def storeUnparsedResourceEvent(mc: Aquarium, initialPayload: Array[Byte], exception: Throwable): Unit = {
|
|
105 |
for(root <- mc.eventsStoreFolder) {
|
|
104 |
def storeUnparsedResourceEvent(aquarium: Aquarium, initialPayload: Array[Byte], exception: Throwable): Unit = {
|
|
105 |
for(root <- aquarium.eventsStoreFolder) {
|
|
106 | 106 |
val occurredMDC = new MutableDateCalc(TimeHelpers.nowMillis()) |
107 | 107 |
val occurredString = occurredMDC.toFilename_YYYYMMDDHHMMSSSSS |
108 | 108 |
val rcEventsFolder = createResourceEventsFolder(root) |
... | ... | |
112 | 112 |
} |
113 | 113 |
} |
114 | 114 |
|
115 |
def storeResourceEvent(mc: Aquarium, event: ResourceEventModel, initialPayload: Array[Byte]): Unit = { |
|
115 |
def storeResourceEvent(aquarium: Aquarium, event: ResourceEventModel, initialPayload: Array[Byte]): Unit = { |
|
116 |
if(!aquarium.saveResourceEventsToEventsStoreFolder) { |
|
117 |
return |
|
118 |
} |
|
119 |
|
|
116 | 120 |
require(event ne null, "Resource event must be not null") |
117 | 121 |
|
118 |
for(root <- mc.eventsStoreFolder) {
|
|
122 |
for(root <- aquarium.eventsStoreFolder) {
|
|
119 | 123 |
val occurredMDC = new MutableDateCalc(event.occurredMillis) |
120 | 124 |
val occurredString = occurredMDC.toFilename_YYYYMMDDHHMMSSSSS |
121 | 125 |
val rcEventsFolder = createResourceEventsFolder(root) |
... | ... | |
137 | 141 |
} |
138 | 142 |
} |
139 | 143 |
|
140 |
def storeUnparsedIMEvent(mc: Aquarium, initialPayload: Array[Byte], exception: Throwable): Unit = {
|
|
141 |
for(root <- mc.eventsStoreFolder) {
|
|
144 |
def storeUnparsedIMEvent(aquarium: Aquarium, initialPayload: Array[Byte], exception: Throwable): Unit = {
|
|
145 |
for(root <- aquarium.eventsStoreFolder) {
|
|
142 | 146 |
val occurredMDC = new MutableDateCalc(TimeHelpers.nowMillis()) |
143 | 147 |
val occurredString = occurredMDC.toFilename_YYYYMMDDHHMMSSSSS |
144 | 148 |
val imEventsFolder = createIMEventsFolder(root) |
... | ... | |
148 | 152 |
} |
149 | 153 |
} |
150 | 154 |
|
151 |
def storeIMEvent(mc: Aquarium, event: IMEventModel, initialPayload: Array[Byte]): Unit = { |
|
155 |
def storeIMEvent(aquarium: Aquarium, event: IMEventModel, initialPayload: Array[Byte]): Unit = { |
|
156 |
if(!aquarium.saveIMEventsToEventsStoreFolder) { |
|
157 |
return |
|
158 |
} |
|
159 |
|
|
152 | 160 |
require(event ne null, "IM event must be not null") |
153 |
for(root <- mc.eventsStoreFolder) { |
|
161 |
|
|
162 |
for(root <- aquarium.eventsStoreFolder) { |
|
154 | 163 |
val occurredMDC = new MutableDateCalc(event.occurredMillis) |
155 | 164 |
val occurredString = occurredMDC.toFilename_YYYYMMDDHHMMSSSSS |
156 | 165 |
val imEventsFolder = createIMEventsFolder(root) |
Also available in: Unified diff