當前位置: 首頁>>代碼示例>>Java>>正文


Java Cache.getReferenceTable方法代碼示例

本文整理匯總了Java中net.openrs.cache.Cache.getReferenceTable方法的典型用法代碼示例。如果您正苦於以下問題:Java Cache.getReferenceTable方法的具體用法?Java Cache.getReferenceTable怎麽用?Java Cache.getReferenceTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.openrs.cache.Cache的用法示例。


在下文中一共展示了Cache.getReferenceTable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.MODELS);
		models = new Model[table.capacity()];
		for (int id = 0; id < table.capacity(); id++) {
			Entry entry = table.getEntry(id);
			if (entry == null)
				continue;

			Container mContainer = cache.read(CacheIndex.MODELS, entry.index());
			ByteBuffer buffer = mContainer.getData();
			
			Model model = new Model(id);
			model.decode(buffer);
			models[id] = model;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading Model(s)!", e);
	}
	logger.info("Loaded " + count + " Model(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:24,代碼來源:ModelList.java

示例2: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.VARCLIENT);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.VARCLIENT).getData(),
				entry.size());

		varClients = new VarClientType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			VarClientType type = new VarClientType(id);
			type.decode(buffer);
			varClients[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading VarClientType(s)!", e);
	}
	logger.info("Loaded " + count + " VarClientType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:VarClientTypeList.java

示例3: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.AREA);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.AREA).getData(),
				entry.size());

		areas = new AreaType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			AreaType type = new AreaType(id);
			type.decode(buffer);
			areas[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading AreaType(s)!", e);
	}
	logger.info("Loaded " + count + " AreaType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:AreaTypeList.java

示例4: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.PARAMS);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.PARAMS).getData(),
				entry.size());

		params = new ParamType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			ParamType type = new ParamType(id);
			type.decode(buffer);
			params[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading ParamType(s)!", e);
	}
	logger.info("Loaded " + count + " ParamType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:ParamTypeList.java

示例5: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.OBJECT);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.OBJECT).getData(),
				entry.size());

		objs = new ObjectType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			ObjectType type = new ObjectType(id);
			type.decode(buffer);
			objs[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading ObjectType(s)!", e);
	}
	logger.info("Loaded " + count + " ObjectType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:ObjectTypeList.java

示例6: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.HITBAR);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.HITBAR).getData(),
				entry.size());

		hitbars = new HitBarType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			HitBarType type = new HitBarType(id);
			type.decode(buffer);
			hitbars[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading HitBarType(s)!", e);
	}
	logger.info("Loaded " + count + " HitBarType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:HitBarTypeList.java

示例7: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.VARCLIENTSTRING);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.VARCLIENTSTRING).getData(),
				entry.size());

		varClients = new VarClientStringType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			VarClientStringType type = new VarClientStringType(id);
			type.decode(buffer);
			varClients[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading VarClientStringType(s)!", e);
	}
	logger.info("Loaded " + count + " VarClientStringType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:VarClientStringTypeList.java

示例8: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.IDENTKIT);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.IDENTKIT).getData(),
				entry.size());

		kits = new IdentkitType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			IdentkitType type = new IdentkitType(id);
			type.decode(buffer);
			kits[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading IdentkitType(s)!", e);
	}
	logger.info("Loaded " + count + " IdentkitType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:IdentkitTypeList.java

示例9: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.OVERLAY);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.OVERLAY).getData(),
				entry.size());

		lays = new OverlayType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			OverlayType type = new OverlayType(id);
			type.decode(buffer);
			lays[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading OverlayType(s)!", e);
	}
	logger.info("Loaded " + count + " OverlayType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:OverlayTypeList.java

示例10: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.INV);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.INV).getData(), entry.size());

		invs = new InvType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			InvType type = new InvType(id);
			type.decode(buffer);
			invs[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading InvType(s)!", e);
	}
	logger.info("Loaded " + count + " InvType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:26,代碼來源:InvTypeList.java

示例11: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.SEQUENCE);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.SEQUENCE).getData(),
				entry.size());

		seqs = new SequenceType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			SequenceType type = new SequenceType(id);
			type.decode(buffer);
			seqs[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading SequenceType(s)!", e);
	}
	logger.info("Loaded " + count + " SequenceType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:SequenceTypeList.java

示例12: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.NPC);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.NPC).getData(), entry.size());

		npcs = new NpcType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			NpcType type = new NpcType(id);
			type.decode(buffer);
			npcs[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading NpcType(s)!", e);
	}
	logger.info("Loaded " + count + " NpcType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:26,代碼來源:NpcTypeList.java

示例13: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.HITMARK);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.HITMARK).getData(),
				entry.size());

		hitmarks = new HitMarkType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			HitMarkType type = new HitMarkType(id);
			type.decode(buffer);
			hitmarks[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading HitMarkType(s)!", e);
	}
	logger.info("Loaded " + count + " HitMarksType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:HitMarkTypeList.java

示例14: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.VARBIT);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.VARBIT).getData(),
				entry.size());

		varBits = new VarBitType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			VarBitType type = new VarBitType(id);
			type.decode(buffer);
			varBits[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading VarBitType(s)!", e);
	}
	logger.info("Loaded " + count + " VarBitType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:VarBitTypeList.java

示例15: initialize

import net.openrs.cache.Cache; //導入方法依賴的package包/類
@Override
public void initialize(Cache cache) {
	int count = 0;
	try {
		ReferenceTable table = cache.getReferenceTable(CacheIndex.CONFIGS);
		Entry entry = table.getEntry(ConfigArchive.SPOTANIM);
		Archive archive = Archive.decode(cache.read(CacheIndex.CONFIGS, ConfigArchive.SPOTANIM).getData(),
				entry.size());

		spots = new SpotAnimType[entry.capacity()];
		for (int id = 0; id < entry.capacity(); id++) {
			ChildEntry child = entry.getEntry(id);
			if (child == null)
				continue;

			ByteBuffer buffer = archive.getEntry(child.index());
			SpotAnimType type = new SpotAnimType(id);
			type.decode(buffer);
			spots[id] = type;
			count++;
		}
	} catch (IOException e) {
		logger.log(Level.SEVERE, "Error Loading SpotAnimType(s)!", e);
	}
	logger.info("Loaded " + count + " SpotAnimType(s)!");
}
 
開發者ID:kfricilone,項目名稱:OpenRS,代碼行數:27,代碼來源:SpotAnimTypeList.java


注:本文中的net.openrs.cache.Cache.getReferenceTable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。