Skip to content

Commit abbfde1

Browse files
committed
make usable for SharkNet 2
1 parent 11ab49b commit abbfde1

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/net/sharksystem/aasp/AASPEngineFS.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public class AASPEngineFS extends AASPEngine {
1313
private final String rootDirectory;
1414
private AASPChunkStorageFS chunkStorageFS;
1515

16+
public static final String DEFAULT_ROOT_FOLDER_NAME = "SHARKSYSTEM_AASP";
17+
1618
private AASPEngineFS(String rootDirectory,
1719
AASPChunkStorageFS chunkStorage)
1820
throws AASPException, IOException {
@@ -98,4 +100,8 @@ public AASPChunkStorage getReceivedChunkStorage(CharSequence sender) {
98100
return new AASPChunkStorageFS(dir);
99101
}
100102

103+
@Override
104+
public AASPChunkStorage getChunkStorage() {
105+
return this.chunkStorageFS;
106+
}
101107
}

src/net/sharksystem/aasp/AASPStorage.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,20 @@ public interface AASPStorage {
121121
*/
122122
public int getPreviousEra(int era);
123123

124+
/**
125+
* Default behaviour of AASPEngine: Each peer / communication partner
126+
* gets its own chunk storage. That storage is filled during aasp
127+
* synchronization. That storage can be retrieved with this command.
128+
*
129+
* @param sender
130+
* @return
131+
*/
124132
public AASPChunkStorage getReceivedChunkStorage(CharSequence sender);
133+
134+
/**
135+
*
136+
* @return The local chunk storage that is meant to be used by the local
137+
* app. Note: That storage is changed during an AASP session.
138+
*/
139+
public AASPChunkStorage getChunkStorage();
125140
}

0 commit comments

Comments
 (0)