mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 08:39:04 +00:00
Make project setup easier with Maven (#411)
* Remove a bunch of .ideas and class files to see if it makes the setup easier * remove some .idea's and imkls * Remove a ton of .class files * [TASK] Switched to maven instead of gradle * [TASK] Added target to gitignore * Remove ignored files * [TASK] Fixed file_server source * [TASK] Fixed client source * [BUGFIX] Main Class * [BUGFIX] Fixed SLF4J * [TASK] Server Libs cleanup * Update setup guide/debug * Maven cli compile instructions * [TASK] Jar building * Update runServer and runFileServer.sh Co-authored-by: Sandro Coutinho <sandro@farrelltech.org>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3)
|
||||
|
||||
public final class MRUNodes {
|
||||
|
||||
public MRUNodes(int i) {
|
||||
emptyNodeSub = new NodeSub();
|
||||
nodeSubList = new NodeSubList();
|
||||
initialCount = i;
|
||||
spaceLeft = i;
|
||||
nodeCache = new NodeCache();
|
||||
}
|
||||
|
||||
public NodeSub insertFromCache(long l) {
|
||||
NodeSub nodeSub = (NodeSub) nodeCache.findNodeByID(l);
|
||||
if (nodeSub != null) {
|
||||
nodeSubList.insertHead(nodeSub);
|
||||
}
|
||||
return nodeSub;
|
||||
}
|
||||
|
||||
public void removeFromCache(NodeSub nodeSub, long l) {
|
||||
try {
|
||||
if (spaceLeft == 0) {
|
||||
NodeSub nodeSub_1 = nodeSubList.popTail();
|
||||
nodeSub_1.unlink();
|
||||
nodeSub_1.unlinkSub();
|
||||
if (nodeSub_1 == emptyNodeSub) {
|
||||
NodeSub nodeSub_2 = nodeSubList.popTail();
|
||||
nodeSub_2.unlink();
|
||||
nodeSub_2.unlinkSub();
|
||||
}
|
||||
} else {
|
||||
spaceLeft--;
|
||||
}
|
||||
nodeCache.removeFromCache(nodeSub, l);
|
||||
nodeSubList.insertHead(nodeSub);
|
||||
return;
|
||||
} catch (RuntimeException runtimeexception) {
|
||||
Signlink.reporterror("47547, " + nodeSub + ", " + l + ", " + (byte) 2 + ", " + runtimeexception.toString());
|
||||
}
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
public void unlinkAll() {
|
||||
do {
|
||||
NodeSub nodeSub = nodeSubList.popTail();
|
||||
if (nodeSub != null) {
|
||||
nodeSub.unlink();
|
||||
nodeSub.unlinkSub();
|
||||
} else {
|
||||
spaceLeft = initialCount;
|
||||
return;
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
|
||||
private final NodeSub emptyNodeSub;
|
||||
private final int initialCount;
|
||||
private int spaceLeft;
|
||||
private final NodeCache nodeCache;
|
||||
private final NodeSubList nodeSubList;
|
||||
}
|
||||
Reference in New Issue
Block a user