target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void createRandomSeed() { for (int i = 0; i < 1000000; i++) { byte[] result = RandomSeedUtils.createRandomSeed(); assertEquals(result.length, 32); } }
public static byte[] createRandomSeed() { BigInteger value = new BigInteger(256, new Random()); byte[] result = value.toByteArray(); if (result.length > 32) { byte[] temp = new byte[32]; System.arraycopy(result, result.length - 32, temp, 0, 32); result = temp; } else if (result.length < 32) { byte[] temp = new byte[32]...
RandomSeedUtils { public static byte[] createRandomSeed() { BigInteger value = new BigInteger(256, new Random()); byte[] result = value.toByteArray(); if (result.length > 32) { byte[] temp = new byte[32]; System.arraycopy(result, result.length - 32, temp, 0, 32); result = temp; } else if (result.length < 32) { byte[] t...
RandomSeedUtils { public static byte[] createRandomSeed() { BigInteger value = new BigInteger(256, new Random()); byte[] result = value.toByteArray(); if (result.length > 32) { byte[] temp = new byte[32]; System.arraycopy(result, result.length - 32, temp, 0, 32); result = temp; } else if (result.length < 32) { byte[] t...
RandomSeedUtils { public static byte[] createRandomSeed() { BigInteger value = new BigInteger(256, new Random()); byte[] result = value.toByteArray(); if (result.length > 32) { byte[] temp = new byte[32]; System.arraycopy(result, result.length - 32, temp, 0, 32); result = temp; } else if (result.length < 32) { byte[] t...
RandomSeedUtils { public static byte[] createRandomSeed() { BigInteger value = new BigInteger(256, new Random()); byte[] result = value.toByteArray(); if (result.length > 32) { byte[] temp = new byte[32]; System.arraycopy(result, result.length - 32, temp, 0, 32); result = temp; } else if (result.length < 32) { byte[] t...
@Test public void getLastDigestEightBytes() { byte[] seed = RandomSeedUtils.createRandomSeed(); byte[] hash = RandomSeedUtils.getLastDigestEightBytes(seed); byte[] hash2 = RandomSeedUtils.getLastDigestEightBytes(seed); assertTrue(ArraysTool.arrayEquals(hash, hash2)); assertEquals(hash.length, 8); }
public static byte[] getLastDigestEightBytes(byte[] bytes) { byte[] hash = Sha256Hash.hashTwice(bytes); byte[] result = new byte[8]; System.arraycopy(hash, bytes.length - 8, result, 0, 8); return result; }
RandomSeedUtils { public static byte[] getLastDigestEightBytes(byte[] bytes) { byte[] hash = Sha256Hash.hashTwice(bytes); byte[] result = new byte[8]; System.arraycopy(hash, bytes.length - 8, result, 0, 8); return result; } }
RandomSeedUtils { public static byte[] getLastDigestEightBytes(byte[] bytes) { byte[] hash = Sha256Hash.hashTwice(bytes); byte[] result = new byte[8]; System.arraycopy(hash, bytes.length - 8, result, 0, 8); return result; } }
RandomSeedUtils { public static byte[] getLastDigestEightBytes(byte[] bytes) { byte[] hash = Sha256Hash.hashTwice(bytes); byte[] result = new byte[8]; System.arraycopy(hash, bytes.length - 8, result, 0, 8); return result; } static byte[] createRandomSeed(); static byte[] getLastDigestEightBytes(byte[] bytes); }
RandomSeedUtils { public static byte[] getLastDigestEightBytes(byte[] bytes) { byte[] hash = Sha256Hash.hashTwice(bytes); byte[] result = new byte[8]; System.arraycopy(hash, bytes.length - 8, result, 0, 8); return result; } static byte[] createRandomSeed(); static byte[] getLastDigestEightBytes(byte[] bytes); static R...
@Test public void testPut() { assertNotNull(blockQueueProvider); assertEquals(0, blockQueueProvider.size()); Block block = new Block(); boolean result = blockQueueProvider.put(new BlockContainer(block, BlockContainerStatus.RECEIVED)); assertTrue(result); assertEquals(1, blockQueueProvider.size()); }
public boolean put(BlockContainer blockContainer) { boolean receive = (blockContainer.getStatus() == BlockContainerStatus.RECEIVED); if (receive) { int status = BlockContainerStatus.RECEIVED; checkDownloadService(); if (!downloadService.isDownloadSuccess().isSuccess()) { status = BlockContainerStatus.DOWNLOADING; } blo...
BlockQueueProvider { public boolean put(BlockContainer blockContainer) { boolean receive = (blockContainer.getStatus() == BlockContainerStatus.RECEIVED); if (receive) { int status = BlockContainerStatus.RECEIVED; checkDownloadService(); if (!downloadService.isDownloadSuccess().isSuccess()) { status = BlockContainerStat...
BlockQueueProvider { public boolean put(BlockContainer blockContainer) { boolean receive = (blockContainer.getStatus() == BlockContainerStatus.RECEIVED); if (receive) { int status = BlockContainerStatus.RECEIVED; checkDownloadService(); if (!downloadService.isDownloadSuccess().isSuccess()) { status = BlockContainerStat...
BlockQueueProvider { public boolean put(BlockContainer blockContainer) { boolean receive = (blockContainer.getStatus() == BlockContainerStatus.RECEIVED); if (receive) { int status = BlockContainerStatus.RECEIVED; checkDownloadService(); if (!downloadService.isDownloadSuccess().isSuccess()) { status = BlockContainerStat...
BlockQueueProvider { public boolean put(BlockContainer blockContainer) { boolean receive = (blockContainer.getStatus() == BlockContainerStatus.RECEIVED); if (receive) { int status = BlockContainerStatus.RECEIVED; checkDownloadService(); if (!downloadService.isDownloadSuccess().isSuccess()) { status = BlockContainerStat...
@Test public void testGet() { assertNotNull(blockQueueProvider); assertEquals(0, blockQueueProvider.size()); if(downloadService.isDownloadSuccess().isSuccess()) { downloadService.setDownloadSuccess(false); } Block block = new Block(); boolean result = blockQueueProvider.put(new BlockContainer(block, BlockContainerStatu...
public BlockContainer get() { BlockContainer blockContainer = null; if (!downloadBlockQueueHasDestory) { blockContainer = downloadBlockQueue.poll(); } checkDownloadService(); boolean hasDownloadSuccess = downloadService.isDownloadSuccess().isSuccess(); if (blockContainer == null && hasDownloadSuccess && !downloadBlockQ...
BlockQueueProvider { public BlockContainer get() { BlockContainer blockContainer = null; if (!downloadBlockQueueHasDestory) { blockContainer = downloadBlockQueue.poll(); } checkDownloadService(); boolean hasDownloadSuccess = downloadService.isDownloadSuccess().isSuccess(); if (blockContainer == null && hasDownloadSucce...
BlockQueueProvider { public BlockContainer get() { BlockContainer blockContainer = null; if (!downloadBlockQueueHasDestory) { blockContainer = downloadBlockQueue.poll(); } checkDownloadService(); boolean hasDownloadSuccess = downloadService.isDownloadSuccess().isSuccess(); if (blockContainer == null && hasDownloadSucce...
BlockQueueProvider { public BlockContainer get() { BlockContainer blockContainer = null; if (!downloadBlockQueueHasDestory) { blockContainer = downloadBlockQueue.poll(); } checkDownloadService(); boolean hasDownloadSuccess = downloadService.isDownloadSuccess().isSuccess(); if (blockContainer == null && hasDownloadSucce...
BlockQueueProvider { public BlockContainer get() { BlockContainer blockContainer = null; if (!downloadBlockQueueHasDestory) { blockContainer = downloadBlockQueue.poll(); } checkDownloadService(); boolean hasDownloadSuccess = downloadService.isDownloadSuccess().isSuccess(); if (blockContainer == null && hasDownloadSucce...
@Test public void testRun() { assertNotNull(blockProcessTask); if(downloadService.isDownloadSuccess().isSuccess()) { downloadService.setDownloadSuccess(false); } ConsensusStatusContext.setConsensusStatus(ConsensusStatus.WAIT_RUNNING); blockProcessTask.run(); assert(!ConsensusStatusContext.isRunning()); downloadService....
@Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); }
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); @Overrid...
BlockProcessTask implements Runnable { @Override public void run() { Lockers.CHAIN_LOCK.lock(); try { doTask(); } catch (Exception e) { Log.error(e); } catch (Error e) { Log.error(e); } catch (Throwable e) { Log.error(e); } finally { Lockers.CHAIN_LOCK.unlock(); } } BlockProcessTask(BlockProcess blockProcess); @Overrid...
@Test public void testInit() { assertNotNull(chain); assertNotNull(chainContainer); assertNotNull(chainContainer.getCurrentRound()); assertEquals(chainContainer.getCurrentRound().getMemberCount(), 1); }
public MeetingRound getCurrentRound() { return roundManager.getCurrentRound(); }
ChainContainer implements Cloneable { public MeetingRound getCurrentRound() { return roundManager.getCurrentRound(); } }
ChainContainer implements Cloneable { public MeetingRound getCurrentRound() { return roundManager.getCurrentRound(); } ChainContainer(Chain chain); }
ChainContainer implements Cloneable { public MeetingRound getCurrentRound() { return roundManager.getCurrentRound(); } ChainContainer(Chain chain); boolean addBlock(Block block); Result verifyBlock(Block block); Result verifyBlock(Block block, boolean isDownload, boolean isNeedCheckCoinBaseTx); boolean verifyCoinBaseTx...
ChainContainer implements Cloneable { public MeetingRound getCurrentRound() { return roundManager.getCurrentRound(); } ChainContainer(Chain chain); boolean addBlock(Block block); Result verifyBlock(Block block); Result verifyBlock(Block block, boolean isDownload, boolean isNeedCheckCoinBaseTx); boolean verifyCoinBaseTx...
@Test public void cacheTx() { Transaction tx = new CacheTestTx(); tx.setTime(1234567654L); try { tx.setHash(NulsDigestData.calcDigestData(tx.serializeForHash())); } catch (IOException e) { Log.error(e); } manager.cacheTx(tx); assertTrue(true); getTx(tx.getHash(), tx); }
public boolean cacheTx(Transaction tx) { return txCacheMap.put(tx.getHash(), tx); }
TemporaryCacheManager { public boolean cacheTx(Transaction tx) { return txCacheMap.put(tx.getHash(), tx); } }
TemporaryCacheManager { public boolean cacheTx(Transaction tx) { return txCacheMap.put(tx.getHash(), tx); } private TemporaryCacheManager(); }
TemporaryCacheManager { public boolean cacheTx(Transaction tx) { return txCacheMap.put(tx.getHash(), tx); } private TemporaryCacheManager(); static TemporaryCacheManager getInstance(); void cacheSmallBlock(SmallBlock smallBlock); void cacheSmallBlockWithRequest(NulsDigestData requestHash, SmallBlock smallBlock); Small...
TemporaryCacheManager { public boolean cacheTx(Transaction tx) { return txCacheMap.put(tx.getHash(), tx); } private TemporaryCacheManager(); static TemporaryCacheManager getInstance(); void cacheSmallBlock(SmallBlock smallBlock); void cacheSmallBlockWithRequest(NulsDigestData requestHash, SmallBlock smallBlock); Small...
@Test public void testAddBlock() { Block bestBlock = chainContainer.getBestBlock(); assertNotNull(bestBlock); Block newBlock = newBlock(bestBlock); Result success = chainContainer.verifyBlock(newBlock); assertTrue(success.isSuccess()); bestBlock = chainContainer.getBestBlock(); assertEquals(bestBlock.getHeader().getHei...
public boolean addBlock(Block block) { if (!chain.getEndBlockHeader().getHash().equals(block.getHeader().getPreHash()) || chain.getEndBlockHeader().getHeight() + 1 != block.getHeader().getHeight()) { return false; } List<Agent> agentList = chain.getAgentList(); List<Deposit> depositList = chain.getDepositList(); List<P...
ChainContainer implements Cloneable { public boolean addBlock(Block block) { if (!chain.getEndBlockHeader().getHash().equals(block.getHeader().getPreHash()) || chain.getEndBlockHeader().getHeight() + 1 != block.getHeader().getHeight()) { return false; } List<Agent> agentList = chain.getAgentList(); List<Deposit> deposi...
ChainContainer implements Cloneable { public boolean addBlock(Block block) { if (!chain.getEndBlockHeader().getHash().equals(block.getHeader().getPreHash()) || chain.getEndBlockHeader().getHeight() + 1 != block.getHeader().getHeight()) { return false; } List<Agent> agentList = chain.getAgentList(); List<Deposit> deposi...
ChainContainer implements Cloneable { public boolean addBlock(Block block) { if (!chain.getEndBlockHeader().getHash().equals(block.getHeader().getPreHash()) || chain.getEndBlockHeader().getHeight() + 1 != block.getHeader().getHeight()) { return false; } List<Agent> agentList = chain.getAgentList(); List<Deposit> deposi...
ChainContainer implements Cloneable { public boolean addBlock(Block block) { if (!chain.getEndBlockHeader().getHash().equals(block.getHeader().getPreHash()) || chain.getEndBlockHeader().getHeight() + 1 != block.getHeader().getHeight()) { return false; } List<Agent> agentList = chain.getAgentList(); List<Deposit> deposi...
@Test public void testRollback() { testAddAgent(); assertEquals(chainContainer.getCurrentRound().getMemberCount(), 2); for (int i = 3; i > 0; i--) { Block bestBlock = chainContainer.getBestBlock(); boolean success = chainContainer.rollback(bestBlock); assert (success); } assertEquals(chainContainer.getCurrentRound().ge...
public boolean rollback(Block block) { int length = chain.getAllBlockList().size(); if (block == null || length == 0) { return false; } Block bestBlock = chain.getBestBlock(); if (!block.getHeader().getHash().equals(bestBlock.getHeader().getHash())) { Log.warn("rollbackTransaction block is not best block"); return fals...
ChainContainer implements Cloneable { public boolean rollback(Block block) { int length = chain.getAllBlockList().size(); if (block == null || length == 0) { return false; } Block bestBlock = chain.getBestBlock(); if (!block.getHeader().getHash().equals(bestBlock.getHeader().getHash())) { Log.warn("rollbackTransaction ...
ChainContainer implements Cloneable { public boolean rollback(Block block) { int length = chain.getAllBlockList().size(); if (block == null || length == 0) { return false; } Block bestBlock = chain.getBestBlock(); if (!block.getHeader().getHash().equals(bestBlock.getHeader().getHash())) { Log.warn("rollbackTransaction ...
ChainContainer implements Cloneable { public boolean rollback(Block block) { int length = chain.getAllBlockList().size(); if (block == null || length == 0) { return false; } Block bestBlock = chain.getBestBlock(); if (!block.getHeader().getHash().equals(bestBlock.getHeader().getHash())) { Log.warn("rollbackTransaction ...
ChainContainer implements Cloneable { public boolean rollback(Block block) { int length = chain.getAllBlockList().size(); if (block == null || length == 0) { return false; } Block bestBlock = chain.getBestBlock(); if (!block.getHeader().getHash().equals(bestBlock.getHeader().getHash())) { Log.warn("rollbackTransaction ...
@Test public void testGetBeforeTheForkChain() { Block forkBlock = null; for (int i = 0; i < 20; i++) { Block bestBlock = chainContainer.getBestBlock(); Block newBlock = newBlock(bestBlock); Result success = chainContainer.verifyAndAddBlock(newBlock, false, true); assertTrue(success.isSuccess()); bestBlock = chainContai...
public ChainContainer getBeforeTheForkChain(ChainContainer chainContainer) { Chain newChain = new Chain(); newChain.setId(chainContainer.getChain().getId()); newChain.initData(chain.getStartBlockHeader(), new CopyOnWriteArrayList<>(chain.getAllBlockHeaderList()), new CopyOnWriteArrayList<>(chain.getAllBlockList())); if...
ChainContainer implements Cloneable { public ChainContainer getBeforeTheForkChain(ChainContainer chainContainer) { Chain newChain = new Chain(); newChain.setId(chainContainer.getChain().getId()); newChain.initData(chain.getStartBlockHeader(), new CopyOnWriteArrayList<>(chain.getAllBlockHeaderList()), new CopyOnWriteArr...
ChainContainer implements Cloneable { public ChainContainer getBeforeTheForkChain(ChainContainer chainContainer) { Chain newChain = new Chain(); newChain.setId(chainContainer.getChain().getId()); newChain.initData(chain.getStartBlockHeader(), new CopyOnWriteArrayList<>(chain.getAllBlockHeaderList()), new CopyOnWriteArr...
ChainContainer implements Cloneable { public ChainContainer getBeforeTheForkChain(ChainContainer chainContainer) { Chain newChain = new Chain(); newChain.setId(chainContainer.getChain().getId()); newChain.initData(chain.getStartBlockHeader(), new CopyOnWriteArrayList<>(chain.getAllBlockHeaderList()), new CopyOnWriteArr...
ChainContainer implements Cloneable { public ChainContainer getBeforeTheForkChain(ChainContainer chainContainer) { Chain newChain = new Chain(); newChain.setId(chainContainer.getChain().getId()); newChain.initData(chain.getStartBlockHeader(), new CopyOnWriteArrayList<>(chain.getAllBlockHeaderList()), new CopyOnWriteArr...
@Test public void testGetAfterTheForkChain() { Block forkBlock = null; for (int i = 0; i < 30; i++) { Block bestBlock = chainContainer.getBestBlock(); Block newBlock = newBlock(bestBlock); Result success = chainContainer.verifyAndAddBlock(newBlock, false, true); assertTrue(success.isSuccess()); bestBlock = chainContain...
public ChainContainer getAfterTheForkChain(ChainContainer chainContainer) { BlockHeader pointBlockHeader = chainContainer.getChain().getStartBlockHeader(); Chain chain = new Chain(); List<Block> blockList = getChain().getAllBlockList(); boolean canAdd = false; for (int i = 0; i < blockList.size(); i++) { Block block = ...
ChainContainer implements Cloneable { public ChainContainer getAfterTheForkChain(ChainContainer chainContainer) { BlockHeader pointBlockHeader = chainContainer.getChain().getStartBlockHeader(); Chain chain = new Chain(); List<Block> blockList = getChain().getAllBlockList(); boolean canAdd = false; for (int i = 0; i < b...
ChainContainer implements Cloneable { public ChainContainer getAfterTheForkChain(ChainContainer chainContainer) { BlockHeader pointBlockHeader = chainContainer.getChain().getStartBlockHeader(); Chain chain = new Chain(); List<Block> blockList = getChain().getAllBlockList(); boolean canAdd = false; for (int i = 0; i < b...
ChainContainer implements Cloneable { public ChainContainer getAfterTheForkChain(ChainContainer chainContainer) { BlockHeader pointBlockHeader = chainContainer.getChain().getStartBlockHeader(); Chain chain = new Chain(); List<Block> blockList = getChain().getAllBlockList(); boolean canAdd = false; for (int i = 0; i < b...
ChainContainer implements Cloneable { public ChainContainer getAfterTheForkChain(ChainContainer chainContainer) { BlockHeader pointBlockHeader = chainContainer.getChain().getStartBlockHeader(); Chain chain = new Chain(); List<Block> blockList = getChain().getAllBlockList(); boolean canAdd = false; for (int i = 0; i < b...
@Test public void init() { bootstrap.init(); assertNotNull(NulsConfig.MODULES_CONFIG); assertNotNull(NulsConfig.NULS_CONFIG); assertTrue(SpringLiteContext.isInitSuccess()); assertNotNull(NulsConfig.VERSION); assertNotNull(ValidatorManager.isInitSuccess()); }
@Override public void init() { String folder = null; try { NulsConfig.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE); String mode = NulsConfig.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, "mode", "main"); if ("main".equals(mode)) { NulsConfig.MODULES_CONFIG = ConfigLoader.loadIni(NulsCons...
MicroKernelBootstrap extends BaseModuleBootstrap { @Override public void init() { String folder = null; try { NulsConfig.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE); String mode = NulsConfig.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, "mode", "main"); if ("main".equals(mode)) { NulsCo...
MicroKernelBootstrap extends BaseModuleBootstrap { @Override public void init() { String folder = null; try { NulsConfig.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE); String mode = NulsConfig.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, "mode", "main"); if ("main".equals(mode)) { NulsCo...
MicroKernelBootstrap extends BaseModuleBootstrap { @Override public void init() { String folder = null; try { NulsConfig.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE); String mode = NulsConfig.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, "mode", "main"); if ("main".equals(mode)) { NulsCo...
MicroKernelBootstrap extends BaseModuleBootstrap { @Override public void init() { String folder = null; try { NulsConfig.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE); String mode = NulsConfig.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, "mode", "main"); if ("main".equals(mode)) { NulsCo...
@Test public void test() { NulsDigestData hash = NulsDigestData.calcDigestData(new byte[32]); System.out.println(hash); assertTrue(true); }
public static NulsDigestData calcDigestData(BaseNulsData data) { return calcDigestData(data, (byte) 0); }
NulsDigestData extends BaseNulsData { public static NulsDigestData calcDigestData(BaseNulsData data) { return calcDigestData(data, (byte) 0); } }
NulsDigestData extends BaseNulsData { public static NulsDigestData calcDigestData(BaseNulsData data) { return calcDigestData(data, (byte) 0); } NulsDigestData(); NulsDigestData(byte algType, byte[] bytes); }
NulsDigestData extends BaseNulsData { public static NulsDigestData calcDigestData(BaseNulsData data) { return calcDigestData(data, (byte) 0); } NulsDigestData(); NulsDigestData(byte algType, byte[] bytes); @Override int size(); @Override void parse(NulsByteBuffer byteBuffer); byte getDigestAlgType(); void setDigestAlg...
NulsDigestData extends BaseNulsData { public static NulsDigestData calcDigestData(BaseNulsData data) { return calcDigestData(data, (byte) 0); } NulsDigestData(); NulsDigestData(byte algType, byte[] bytes); @Override int size(); @Override void parse(NulsByteBuffer byteBuffer); byte getDigestAlgType(); void setDigestAlg...
@Test public void subscribeMessage() throws Exception { subscribe(); assertNotNull(handlerId); Field field = messageBusService.getClass().getDeclaredField("processorManager"); field.setAccessible(true); DispatchManager processorManager = (DispatchManager) field.get(messageBusService); Class processorManagerClass = proc...
@Override public String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler) { MessageManager.putMessage(messageClass); return handlerManager.registerMessageHandler(null, messageClass, messageHandler); }
MessageBusServiceImpl implements MessageBusService { @Override public String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler) { MessageManager.putMessage(messageClass); return handlerManager.registerMessageHandler(null, messageClass, messageHandler); ...
MessageBusServiceImpl implements MessageBusService { @Override public String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler) { MessageManager.putMessage(messageClass); return handlerManager.registerMessageHandler(null, messageClass, messageHandler); ...
MessageBusServiceImpl implements MessageBusService { @Override public String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler) { MessageManager.putMessage(messageClass); return handlerManager.registerMessageHandler(null, messageClass, messageHandler); ...
MessageBusServiceImpl implements MessageBusService { @Override public String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler) { MessageManager.putMessage(messageClass); return handlerManager.registerMessageHandler(null, messageClass, messageHandler); ...
@Test public void unsubscribeMessage() throws Exception { messageBusService.unsubscribeMessage(handlerId); Field field = messageBusService.getClass().getDeclaredField("processorManager"); field.setAccessible(true); DispatchManager processorManager = (DispatchManager) field.get(messageBusService); Class processorManager...
@Override public void unsubscribeMessage(String subscribeId) { this.handlerManager.removeMessageHandler(subscribeId); }
MessageBusServiceImpl implements MessageBusService { @Override public void unsubscribeMessage(String subscribeId) { this.handlerManager.removeMessageHandler(subscribeId); } }
MessageBusServiceImpl implements MessageBusService { @Override public void unsubscribeMessage(String subscribeId) { this.handlerManager.removeMessageHandler(subscribeId); } }
MessageBusServiceImpl implements MessageBusService { @Override public void unsubscribeMessage(String subscribeId) { this.handlerManager.removeMessageHandler(subscribeId); } @Override String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler); @Override ...
MessageBusServiceImpl implements MessageBusService { @Override public void unsubscribeMessage(String subscribeId) { this.handlerManager.removeMessageHandler(subscribeId); } @Override String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessageHandler<? extends BaseMessage> messageHandler); @Override ...
@Test public void receiveMessage() { BlockMessage blockMessage = new BlockMessage(); Node node = new Node("192.168.1.90",8003,1); messageBusService.receiveMessage(blockMessage, node); }
@Override public void receiveMessage(BaseMessage message, Node node) { try { this.processorManager.offer(new ProcessData(message, node)); } catch (Exception e) { Log.error(e); } }
MessageBusServiceImpl implements MessageBusService { @Override public void receiveMessage(BaseMessage message, Node node) { try { this.processorManager.offer(new ProcessData(message, node)); } catch (Exception e) { Log.error(e); } } }
MessageBusServiceImpl implements MessageBusService { @Override public void receiveMessage(BaseMessage message, Node node) { try { this.processorManager.offer(new ProcessData(message, node)); } catch (Exception e) { Log.error(e); } } }
MessageBusServiceImpl implements MessageBusService { @Override public void receiveMessage(BaseMessage message, Node node) { try { this.processorManager.offer(new ProcessData(message, node)); } catch (Exception e) { Log.error(e); } } @Override String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessa...
MessageBusServiceImpl implements MessageBusService { @Override public void receiveMessage(BaseMessage message, Node node) { try { this.processorManager.offer(new ProcessData(message, node)); } catch (Exception e) { Log.error(e); } } @Override String subscribeMessage(Class<? extends BaseMessage> messageClass, NulsMessa...
@Test public void broadcastAndCache() { BlockMessage blockMessage = new BlockMessage(); Node node = new Node("192.168.1.90",8003,1); boolean aysn = true; Result<List<String>> result = messageBusService.broadcast(blockMessage, node, aysn,100); assertTrue(result.isSuccess()); assertTrue(result.getData().size()>0); }
@Override public Result<List<String>> broadcast(BaseMessage message, Node excludeNode, boolean aysn, int percent) { BroadcastResult result = networkService.sendToAllNode(message, excludeNode, aysn, percent); return getNodeIdListResult(result); }
MessageBusServiceImpl implements MessageBusService { @Override public Result<List<String>> broadcast(BaseMessage message, Node excludeNode, boolean aysn, int percent) { BroadcastResult result = networkService.sendToAllNode(message, excludeNode, aysn, percent); return getNodeIdListResult(result); } }
MessageBusServiceImpl implements MessageBusService { @Override public Result<List<String>> broadcast(BaseMessage message, Node excludeNode, boolean aysn, int percent) { BroadcastResult result = networkService.sendToAllNode(message, excludeNode, aysn, percent); return getNodeIdListResult(result); } }
MessageBusServiceImpl implements MessageBusService { @Override public Result<List<String>> broadcast(BaseMessage message, Node excludeNode, boolean aysn, int percent) { BroadcastResult result = networkService.sendToAllNode(message, excludeNode, aysn, percent); return getNodeIdListResult(result); } @Override String sub...
MessageBusServiceImpl implements MessageBusService { @Override public Result<List<String>> broadcast(BaseMessage message, Node excludeNode, boolean aysn, int percent) { BroadcastResult result = networkService.sendToAllNode(message, excludeNode, aysn, percent); return getNodeIdListResult(result); } @Override String sub...
@Test public void destroy() { manager.destroy(); assertNull(EhCacheManager.getInstance().getCache("temp-small-block-cache")); assertNull(EhCacheManager.getInstance().getCache("temp-tx-cache")); }
public void destroy() { this.smallBlockCacheMap.clear(); this.txCacheMap.clear(); }
TemporaryCacheManager { public void destroy() { this.smallBlockCacheMap.clear(); this.txCacheMap.clear(); } }
TemporaryCacheManager { public void destroy() { this.smallBlockCacheMap.clear(); this.txCacheMap.clear(); } private TemporaryCacheManager(); }
TemporaryCacheManager { public void destroy() { this.smallBlockCacheMap.clear(); this.txCacheMap.clear(); } private TemporaryCacheManager(); static TemporaryCacheManager getInstance(); void cacheSmallBlock(SmallBlock smallBlock); void cacheSmallBlockWithRequest(NulsDigestData requestHash, SmallBlock smallBlock); Small...
TemporaryCacheManager { public void destroy() { this.smallBlockCacheMap.clear(); this.txCacheMap.clear(); } private TemporaryCacheManager(); static TemporaryCacheManager getInstance(); void cacheSmallBlock(SmallBlock smallBlock); void cacheSmallBlockWithRequest(NulsDigestData requestHash, SmallBlock smallBlock); Small...
@Test public void sendToNode() { BlockMessage blockMessage = new BlockMessage(); Node node = new Node("192.168.1.90",8003,1); boolean aysn = true; assertTrue(messageBusService.sendToNode(blockMessage, node, aysn).isSuccess()); }
@Override public Result sendToNode(BaseMessage message, Node node, boolean aysn) { BroadcastResult result = networkService.sendToNode(message, node, aysn); if (!result.isSuccess()) { Log.error("send to node fail reason: " + result.getErrorCode().getMsg() + "::::" + node.getId()); } return new Result(result.isSuccess(),...
MessageBusServiceImpl implements MessageBusService { @Override public Result sendToNode(BaseMessage message, Node node, boolean aysn) { BroadcastResult result = networkService.sendToNode(message, node, aysn); if (!result.isSuccess()) { Log.error("send to node fail reason: " + result.getErrorCode().getMsg() + "::::" + n...
MessageBusServiceImpl implements MessageBusService { @Override public Result sendToNode(BaseMessage message, Node node, boolean aysn) { BroadcastResult result = networkService.sendToNode(message, node, aysn); if (!result.isSuccess()) { Log.error("send to node fail reason: " + result.getErrorCode().getMsg() + "::::" + n...
MessageBusServiceImpl implements MessageBusService { @Override public Result sendToNode(BaseMessage message, Node node, boolean aysn) { BroadcastResult result = networkService.sendToNode(message, node, aysn); if (!result.isSuccess()) { Log.error("send to node fail reason: " + result.getErrorCode().getMsg() + "::::" + n...
MessageBusServiceImpl implements MessageBusService { @Override public Result sendToNode(BaseMessage message, Node node, boolean aysn) { BroadcastResult result = networkService.sendToNode(message, node, aysn); if (!result.isSuccess()) { Log.error("send to node fail reason: " + result.getErrorCode().getMsg() + "::::" + n...
@Test public void start() { messageBusModuleBootstrap.start(); }
@Override public void start() { DispatchManager.getInstance().init(true); }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void start() { DispatchManager.getInstance().init(true); } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void start() { DispatchManager.getInstance().init(true); } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void start() { DispatchManager.getInstance().init(true); } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void start() { DispatchManager.getInstance().init(true); } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
@Test public void shutdown() { messageBusModuleBootstrap.shutdown(); }
@Override public void shutdown() { DispatchManager.getInstance().shutdown(); }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void shutdown() { DispatchManager.getInstance().shutdown(); } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void shutdown() { DispatchManager.getInstance().shutdown(); } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void shutdown() { DispatchManager.getInstance().shutdown(); } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void shutdown() { DispatchManager.getInstance().shutdown(); } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
@Test public void destroy() { messageBusModuleBootstrap.destroy(); }
@Override public void destroy() { }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void destroy() { } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void destroy() { } }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void destroy() { } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
MessageBusModuleBootstrap extends AbstractMessageBusModule { @Override public void destroy() { } @Override void init(); @Override void start(); @Override void shutdown(); @Override void destroy(); @Override String getInfo(); }
@Test public void getPrivateKeyTest() { List<Account> accounts = this.accountService.createAccount(1, "nuls123456").getData(); Account account = accounts.get(0); Result result = accountBaseService.getPrivateKey(account.getAddress().toString(), "nuls123456"); assertTrue(result.isSuccess()); try { account.unlock("nuls123...
public Result getPrivateKey(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(address).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT_NOT_EXIST); } if (ac...
AccountBaseService { public Result getPrivateKey(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(address).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT...
AccountBaseService { public Result getPrivateKey(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(address).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT...
AccountBaseService { public Result getPrivateKey(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(address).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT...
AccountBaseService { public Result getPrivateKey(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(address).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT...
@Test public void setPassword() { List<Account> accounts = this.accountService.createAccount(1, "").getData(); Account account = accounts.get(0); accountBaseService.setPassword(account.getAddress().toString(),"nuls123456"); Account acc = accountService.getAccount(account.getAddress()).getData(); try { assertTrue(acc.un...
public Result setPassword(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(password)) { return Result.getFailed(AccountErrorCode.NULL_PARAMETER); } if (!StringUtils.validPassword(password)) { return Result.get...
AccountBaseService { public Result setPassword(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(password)) { return Result.getFailed(AccountErrorCode.NULL_PARAMETER); } if (!StringUtils.validPassword(password)...
AccountBaseService { public Result setPassword(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(password)) { return Result.getFailed(AccountErrorCode.NULL_PARAMETER); } if (!StringUtils.validPassword(password)...
AccountBaseService { public Result setPassword(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(password)) { return Result.getFailed(AccountErrorCode.NULL_PARAMETER); } if (!StringUtils.validPassword(password)...
AccountBaseService { public Result setPassword(String address, String password) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(password)) { return Result.getFailed(AccountErrorCode.NULL_PARAMETER); } if (!StringUtils.validPassword(password)...
@Test public void changePassword() { List<Account> accounts = this.accountService.createAccount(1, "nuls123456").getData(); Account account = accounts.get(0); accountBaseService.changePassword(account.getAddress().toString(),"nuls123456", "nuls111111"); Account acc = accountService.getAccount(account.getAddress()).getD...
public Result changePassword(String address, String oldPassword, String newPassword) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(oldPassword)) { return Result.getFailed(AccountErrorCode.PARAMETER_ERROR); } if (StringUtils.isBlank(newPass...
AccountBaseService { public Result changePassword(String address, String oldPassword, String newPassword) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(oldPassword)) { return Result.getFailed(AccountErrorCode.PARAMETER_ERROR); } if (String...
AccountBaseService { public Result changePassword(String address, String oldPassword, String newPassword) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(oldPassword)) { return Result.getFailed(AccountErrorCode.PARAMETER_ERROR); } if (String...
AccountBaseService { public Result changePassword(String address, String oldPassword, String newPassword) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(oldPassword)) { return Result.getFailed(AccountErrorCode.PARAMETER_ERROR); } if (String...
AccountBaseService { public Result changePassword(String address, String oldPassword, String newPassword) { if (!AddressTool.validAddress(address)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } if (StringUtils.isBlank(oldPassword)) { return Result.getFailed(AccountErrorCode.PARAMETER_ERROR); } if (String...
@Test public void setAlias() { List<Account> accounts = accountService.createAccount(1, "nuls123456").getData(); Account account = accounts.get(0); Result result = aliasService.setAlias(account.getAddress().toString(), "nuls123456", "Charlie555"); assertTrue(result.isSuccess()); }
public Result<String> setAlias(String addr, String aliasName, String password) { if (!AddressTool.validAddress(addr)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(addr).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.ACCOUNT_NOT_EXIS...
AliasService { public Result<String> setAlias(String addr, String aliasName, String password) { if (!AddressTool.validAddress(addr)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(addr).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.A...
AliasService { public Result<String> setAlias(String addr, String aliasName, String password) { if (!AddressTool.validAddress(addr)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(addr).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.A...
AliasService { public Result<String> setAlias(String addr, String aliasName, String password) { if (!AddressTool.validAddress(addr)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(addr).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.A...
AliasService { public Result<String> setAlias(String addr, String aliasName, String password) { if (!AddressTool.validAddress(addr)) { return Result.getFailed(AccountErrorCode.ADDRESS_ERROR); } Account account = accountService.getAccount(addr).getData(); if (null == account) { return Result.getFailed(AccountErrorCode.A...
@Test public void saveAlias() { List<Account> accounts = accountService.createAccount(1, "nuls123456").getData(); Account account = accounts.get(0); Alias alias = new Alias(account.getAddress().getAddressBytes(), "lichao"); try { assertTrue(aliasService.saveAlias(new AliasPo(alias)).isSuccess()); } catch (NulsException...
public Result saveAlias(AliasPo aliaspo) throws NulsException { try { Result result = aliasStorageService.saveAlias(aliaspo); if (result.isFailed()) { this.rollbackAlias(aliaspo); } AccountPo po = accountStorageService.getAccount(aliaspo.getAddress()).getData(); if (null != po) { po.setAlias(aliaspo.getAlias()); Result...
AliasService { public Result saveAlias(AliasPo aliaspo) throws NulsException { try { Result result = aliasStorageService.saveAlias(aliaspo); if (result.isFailed()) { this.rollbackAlias(aliaspo); } AccountPo po = accountStorageService.getAccount(aliaspo.getAddress()).getData(); if (null != po) { po.setAlias(aliaspo.getA...
AliasService { public Result saveAlias(AliasPo aliaspo) throws NulsException { try { Result result = aliasStorageService.saveAlias(aliaspo); if (result.isFailed()) { this.rollbackAlias(aliaspo); } AccountPo po = accountStorageService.getAccount(aliaspo.getAddress()).getData(); if (null != po) { po.setAlias(aliaspo.getA...
AliasService { public Result saveAlias(AliasPo aliaspo) throws NulsException { try { Result result = aliasStorageService.saveAlias(aliaspo); if (result.isFailed()) { this.rollbackAlias(aliaspo); } AccountPo po = accountStorageService.getAccount(aliaspo.getAddress()).getData(); if (null != po) { po.setAlias(aliaspo.getA...
AliasService { public Result saveAlias(AliasPo aliaspo) throws NulsException { try { Result result = aliasStorageService.saveAlias(aliaspo); if (result.isFailed()) { this.rollbackAlias(aliaspo); } AccountPo po = accountStorageService.getAccount(aliaspo.getAddress()).getData(); if (null != po) { po.setAlias(aliaspo.getA...
@Test public void test1() { try { byte[] key = LedgerUtil.asBytes("aasdasdasdasda"); dbService.putModel(area, key, data); CallContractData dataConvert = dbService.getModel(area, key, CallContractData.class); System.out.println(dataConvert.toString()); String[][] strings = dataConvert.getArgs(); for(String[] bbb : strin...
public String[][] getArgs() { return args; }
CallContractData extends TransactionLogicData implements ContractData { public String[][] getArgs() { return args; } }
CallContractData extends TransactionLogicData implements ContractData { public String[][] getArgs() { return args; } }
CallContractData extends TransactionLogicData implements ContractData { public String[][] getArgs() { return args; } @Override int size(); @Override void parse(NulsByteBuffer byteBuffer); @Override byte[] getSender(); void setSender(byte[] sender); @Override byte[] getContractAddress(); void setContractAddress(byte[] ...
CallContractData extends TransactionLogicData implements ContractData { public String[][] getArgs() { return args; } @Override int size(); @Override void parse(NulsByteBuffer byteBuffer); @Override byte[] getSender(); void setSender(byte[] sender); @Override byte[] getContractAddress(); void setContractAddress(byte[] ...
@Test public void getBlockBytes() { assertTrue(true); }
@GET @Path("/bytes") @Produces(MediaType.APPLICATION_JSON) public RpcClientResult getBlockBytes(@QueryParam("hash") String hash) throws IOException { Result result; if (!NulsDigestData.validHash(hash)) { return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult(); } Block block = null; try { block = bl...
BlockResource { @GET @Path("/bytes") @Produces(MediaType.APPLICATION_JSON) public RpcClientResult getBlockBytes(@QueryParam("hash") String hash) throws IOException { Result result; if (!NulsDigestData.validHash(hash)) { return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult(); } Block block = null; ...
BlockResource { @GET @Path("/bytes") @Produces(MediaType.APPLICATION_JSON) public RpcClientResult getBlockBytes(@QueryParam("hash") String hash) throws IOException { Result result; if (!NulsDigestData.validHash(hash)) { return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult(); } Block block = null; ...
BlockResource { @GET @Path("/bytes") @Produces(MediaType.APPLICATION_JSON) public RpcClientResult getBlockBytes(@QueryParam("hash") String hash) throws IOException { Result result; if (!NulsDigestData.validHash(hash)) { return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult(); } Block block = null; ...
BlockResource { @GET @Path("/bytes") @Produces(MediaType.APPLICATION_JSON) public RpcClientResult getBlockBytes(@QueryParam("hash") String hash) throws IOException { Result result; if (!NulsDigestData.validHash(hash)) { return Result.getFailed(KernelErrorCode.PARAMETER_ERROR).toRpcClientResult(); } Block block = null; ...
@Test public void signedMessageToKeyTest() throws SignatureException { ECKey key = new ECKey(); System.out.println(key.getPrivateKeyAsHex()); System.out.println(key.getPublicKeyAsHex()); String message = "Nuls Signed Message:\nHello,I'am test case!@##$%998877"; String signatureBase64 = key.signMessage(message,null); Sy...
public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { throw new SignatureException("Could not decode base64", e); } if (signatureEncoded.length < 65) thro...
ECKey { public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { throw new SignatureException("Could not decode base64", e); } if (signatureEncoded.length < ...
ECKey { public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { throw new SignatureException("Could not decode base64", e); } if (signatureEncoded.length < ...
ECKey { public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { throw new SignatureException("Could not decode base64", e); } if (signatureEncoded.length < ...
ECKey { public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { throw new SignatureException("Could not decode base64", e); } if (signatureEncoded.length < ...
@Test public void higherThan() { String v1 = "1.1.0"; String v2 = "1.1.0-beta"; String v3 = "1.1.1"; String v4 = "1.1.1-beta1"; String v5 = "1.1.1-beta2"; String v6 = "1.1.2-beta1"; String v7 = "1.2.0"; assertTrue(!VersionUtils.higherThan(v2, v1)); assertTrue(VersionUtils.higherThan(v3, v2)); assertTrue(VersionUtils.hi...
public static boolean higherThan(String version0, String version1) { if (StringUtils.isBlank(version0) || StringUtils.isBlank(version1)) { throw new RuntimeException("version is null"); } Integer[] intArr0 = strArrayToInt(version0); Integer[] intArr1 = strArrayToInt(version1); boolean result = false; for (int i = 0; i ...
VersionUtils { public static boolean higherThan(String version0, String version1) { if (StringUtils.isBlank(version0) || StringUtils.isBlank(version1)) { throw new RuntimeException("version is null"); } Integer[] intArr0 = strArrayToInt(version0); Integer[] intArr1 = strArrayToInt(version1); boolean result = false; for...
VersionUtils { public static boolean higherThan(String version0, String version1) { if (StringUtils.isBlank(version0) || StringUtils.isBlank(version1)) { throw new RuntimeException("version is null"); } Integer[] intArr0 = strArrayToInt(version0); Integer[] intArr1 = strArrayToInt(version1); boolean result = false; for...
VersionUtils { public static boolean higherThan(String version0, String version1) { if (StringUtils.isBlank(version0) || StringUtils.isBlank(version1)) { throw new RuntimeException("version is null"); } Integer[] intArr0 = strArrayToInt(version0); Integer[] intArr1 = strArrayToInt(version1); boolean result = false; for...
VersionUtils { public static boolean higherThan(String version0, String version1) { if (StringUtils.isBlank(version0) || StringUtils.isBlank(version1)) { throw new RuntimeException("version is null"); } Integer[] intArr0 = strArrayToInt(version0); Integer[] intArr1 = strArrayToInt(version1); boolean result = false; for...
@Test public void deleteFolder() { FileUtil.deleteFolder("C:\\Users\\Administrator\\Desktop\\release\\NULS-Wallet-0.9.10-windows-x64-for-test\\conf\\client-web"); }
public static boolean deleteFolder(File folder) { if (!folder.exists()) { return true; } File[] files = folder.listFiles(); for (File file : files) { if (file.isFile()) { try { boolean b = file.delete(); if (!b) { Log.info("delete " + file.getName() + " result:" + b); mkNullToFile(file); } } catch (Exception e) { Log.e...
FileUtil { public static boolean deleteFolder(File folder) { if (!folder.exists()) { return true; } File[] files = folder.listFiles(); for (File file : files) { if (file.isFile()) { try { boolean b = file.delete(); if (!b) { Log.info("delete " + file.getName() + " result:" + b); mkNullToFile(file); } } catch (Exception...
FileUtil { public static boolean deleteFolder(File folder) { if (!folder.exists()) { return true; } File[] files = folder.listFiles(); for (File file : files) { if (file.isFile()) { try { boolean b = file.delete(); if (!b) { Log.info("delete " + file.getName() + " result:" + b); mkNullToFile(file); } } catch (Exception...
FileUtil { public static boolean deleteFolder(File folder) { if (!folder.exists()) { return true; } File[] files = folder.listFiles(); for (File file : files) { if (file.isFile()) { try { boolean b = file.delete(); if (!b) { Log.info("delete " + file.getName() + " result:" + b); mkNullToFile(file); } } catch (Exception...
FileUtil { public static boolean deleteFolder(File folder) { if (!folder.exists()) { return true; } File[] files = folder.listFiles(); for (File file : files) { if (file.isFile()) { try { boolean b = file.delete(); if (!b) { Log.info("delete " + file.getName() + " result:" + b); mkNullToFile(file); } } catch (Exception...
@Test public void download() { System.out.print("abcdefg"); System.out.print("\b"); System.out.print("\b"); System.out.print("\b"); }
private boolean download(String url, String filePath, String signature) throws IOException { if (!upgrading) { setFailedMessage("The upgrade has stopped"); return false; } byte[] bytes = HttpDownloadUtils.download(url); if (!verifySig(bytes, Hex.decode(signature))) { setFailedMessage("Signature verification is incorrec...
UpgradeThread implements Runnable { private boolean download(String url, String filePath, String signature) throws IOException { if (!upgrading) { setFailedMessage("The upgrade has stopped"); return false; } byte[] bytes = HttpDownloadUtils.download(url); if (!verifySig(bytes, Hex.decode(signature))) { setFailedMessage...
UpgradeThread implements Runnable { private boolean download(String url, String filePath, String signature) throws IOException { if (!upgrading) { setFailedMessage("The upgrade has stopped"); return false; } byte[] bytes = HttpDownloadUtils.download(url); if (!verifySig(bytes, Hex.decode(signature))) { setFailedMessage...
UpgradeThread implements Runnable { private boolean download(String url, String filePath, String signature) throws IOException { if (!upgrading) { setFailedMessage("The upgrade has stopped"); return false; } byte[] bytes = HttpDownloadUtils.download(url); if (!verifySig(bytes, Hex.decode(signature))) { setFailedMessage...
UpgradeThread implements Runnable { private boolean download(String url, String filePath, String signature) throws IOException { if (!upgrading) { setFailedMessage("The upgrade has stopped"); return false; } byte[] bytes = HttpDownloadUtils.download(url); if (!verifySig(bytes, Hex.decode(signature))) { setFailedMessage...
@Test public void getAgentId() { NulsDigestData hash = NulsDigestData.calcDigestData("123123".getBytes()); System.out.println(PoConvertUtil.getAgentId(hash)); System.out.println(hash); assertTrue(true); }
public static String getAgentId(NulsDigestData hash) { String hashHex = hash.getDigestHex(); return hashHex.substring(hashHex.length() - 8).toUpperCase(); }
PoConvertUtil { public static String getAgentId(NulsDigestData hash) { String hashHex = hash.getDigestHex(); return hashHex.substring(hashHex.length() - 8).toUpperCase(); } }
PoConvertUtil { public static String getAgentId(NulsDigestData hash) { String hashHex = hash.getDigestHex(); return hashHex.substring(hashHex.length() - 8).toUpperCase(); } }
PoConvertUtil { public static String getAgentId(NulsDigestData hash) { String hashHex = hash.getDigestHex(); return hashHex.substring(hashHex.length() - 8).toUpperCase(); } static Agent poToAgent(AgentPo agentPo); static AgentPo agentToPo(Agent agent); static Deposit poToDeposit(DepositPo po); static DepositPo deposit...
PoConvertUtil { public static String getAgentId(NulsDigestData hash) { String hashHex = hash.getDigestHex(); return hashHex.substring(hashHex.length() - 8).toUpperCase(); } static Agent poToAgent(AgentPo agentPo); static AgentPo agentToPo(Agent agent); static Deposit poToDeposit(DepositPo po); static DepositPo deposit...
@Test public void testNewOrphanChain() { assertNotNull(chainManager); Block block = createBlock(); chainManager.newOrphanChain(block); assertEquals(1, chainManager.getOrphanChains().size()); }
public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanChainAndAdd...
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanChainAndAdd...
@Test public void testGetBestBlockHeight() { assertNotNull(chainManager); Block block = createBlock(); ChainContainer masterChain = new ChainContainer(new Chain()); chainManager.setMasterChain(masterChain); masterChain.getChain().addBlock(block); assertEquals(0L, chainManager.getBestBlockHeight()); }
public long getBestBlockHeight() { if(masterChain == null || masterChain.getChain() == null || masterChain.getChain().getEndBlockHeader() == null) { return 0L; } return masterChain.getChain().getEndBlockHeader().getHeight(); }
ChainManager { public long getBestBlockHeight() { if(masterChain == null || masterChain.getChain() == null || masterChain.getChain().getEndBlockHeader() == null) { return 0L; } return masterChain.getChain().getEndBlockHeader().getHeight(); } }
ChainManager { public long getBestBlockHeight() { if(masterChain == null || masterChain.getChain() == null || masterChain.getChain().getEndBlockHeader() == null) { return 0L; } return masterChain.getChain().getEndBlockHeader().getHeight(); } ChainManager(); }
ChainManager { public long getBestBlockHeight() { if(masterChain == null || masterChain.getChain() == null || masterChain.getChain().getEndBlockHeader() == null) { return 0L; } return masterChain.getChain().getEndBlockHeader().getHeight(); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanC...
ChainManager { public long getBestBlockHeight() { if(masterChain == null || masterChain.getChain() == null || masterChain.getChain().getEndBlockHeader() == null) { return 0L; } return masterChain.getChain().getEndBlockHeader().getHeight(); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanC...
@Test public void testCheckIsBeforeOrphanChainAndAdd() { testGetBestBlockHeight(); Block block = createBlock(); Block block1 = createBlock(); block1.getHeader().setHeight(1L); block1.getHeader().setPreHash(block.getHeader().getHash()); ChainContainer orphanChain = new ChainContainer(new Chain()); orphanChain.getChain()...
public boolean checkIsBeforeOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); boolean success = false; for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getHash().equals(chain.getStartBlockHeader().getPreHash())) { success = true; chain.addPreB...
ChainManager { public boolean checkIsBeforeOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); boolean success = false; for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getHash().equals(chain.getStartBlockHeader().getPreHash())) { success = true...
ChainManager { public boolean checkIsBeforeOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); boolean success = false; for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getHash().equals(chain.getStartBlockHeader().getPreHash())) { success = true...
ChainManager { public boolean checkIsBeforeOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); boolean success = false; for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getHash().equals(chain.getStartBlockHeader().getPreHash())) { success = true...
ChainManager { public boolean checkIsBeforeOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); boolean success = false; for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getHash().equals(chain.getStartBlockHeader().getPreHash())) { success = true...
@Test public void testCheckIsAfterOrphanChainAndAdd() { testGetBestBlockHeight(); Block block = createBlock(); Block block1 = createBlock(); block1.getHeader().setHeight(1L); block1.getHeader().setPreHash(block.getHeader().getHash()); ChainContainer orphanChain = new ChainContainer(new Chain()); orphanChain.getChain()....
public boolean checkIsAfterOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getPreHash().equals(chain.getEndBlockHeader().getHash())) { chain.addBlock(block); return true; } } return false; }
ChainManager { public boolean checkIsAfterOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getPreHash().equals(chain.getEndBlockHeader().getHash())) { chain.addBlock(block); return true; } } re...
ChainManager { public boolean checkIsAfterOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getPreHash().equals(chain.getEndBlockHeader().getHash())) { chain.addBlock(block); return true; } } re...
ChainManager { public boolean checkIsAfterOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getPreHash().equals(chain.getEndBlockHeader().getHash())) { chain.addBlock(block); return true; } } re...
ChainManager { public boolean checkIsAfterOrphanChainAndAdd(Block block) { BlockHeader header = block.getHeader(); for(ChainContainer chainContainer : orphanChains) { Chain chain = chainContainer.getChain(); if(header.getPreHash().equals(chain.getEndBlockHeader().getHash())) { chain.addBlock(block); return true; } } re...
@Test public void testAddRound() { assertNotNull(roundManager); assertNotNull(roundManager.getChain()); assertEquals(0, roundManager.getRoundList().size()); MeetingRound round = new MeetingRound(); roundManager.addRound(round); assertEquals(1, roundManager.getRoundList().size()); assertEquals(round, roundManager.getCur...
public void addRound(MeetingRound meetingRound) { roundList.add(meetingRound); }
RoundManager { public void addRound(MeetingRound meetingRound) { roundList.add(meetingRound); } }
RoundManager { public void addRound(MeetingRound meetingRound) { roundList.add(meetingRound); } RoundManager(Chain chain); }
RoundManager { public void addRound(MeetingRound meetingRound) { roundList.add(meetingRound); } RoundManager(Chain chain); MeetingRound getRoundByIndex(long roundIndex); void addRound(MeetingRound meetingRound); void checkIsNeedReset(); boolean clearRound(int count); MeetingRound getCurrentRound(); MeetingRound initRou...
RoundManager { public void addRound(MeetingRound meetingRound) { roundList.add(meetingRound); } RoundManager(Chain chain); MeetingRound getRoundByIndex(long roundIndex); void addRound(MeetingRound meetingRound); void checkIsNeedReset(); boolean clearRound(int count); MeetingRound getCurrentRound(); MeetingRound initRou...
@Test public void testAttributeInitializer() { AttributeDefinition<Properties> def = AttributeDefinition.builder("props", null, Properties.class).initializer(new AttributeInitializer<Properties>() { @Override public Properties initialize() { return new Properties(); } }).build(); Attribute<Properties> attribute1 = def....
public T get() { return value; }
Attribute implements Cloneable, Matchable<Attribute<?>> { public T get() { return value; } }
Attribute implements Cloneable, Matchable<Attribute<?>> { public T get() { return value; } Attribute(AttributeDefinition<T> definition); }
Attribute implements Cloneable, Matchable<Attribute<?>> { public T get() { return value; } Attribute(AttributeDefinition<T> definition); String name(); T get(); T getInitialValue(); void validate(); Attribute<T> protect(); void set(T value); T computeIfAbsent(Supplier<T> supplier); boolean isImmutable(); boolean isPers...
Attribute implements Cloneable, Matchable<Attribute<?>> { public T get() { return value; } Attribute(AttributeDefinition<T> definition); String name(); T get(); T getInitialValue(); void validate(); Attribute<T> protect(); void set(T value); T computeIfAbsent(Supplier<T> supplier); boolean isImmutable(); boolean isPers...
@Test public void testJavaToOctetStreamConversion() throws IOException, InterruptedException { Marshaller marshaller = new ProtoStreamMarshaller(); String string = "I've seen things you people wouldn't believe."; Double number = 12.1d; Instant complex = Instant.now(); byte[] binary = new byte[]{1, 2, 3}; MediaType stri...
public static byte[] convertJavaToOctetStream(Object source, MediaType sourceMediaType, Marshaller marshaller) throws IOException, InterruptedException { if (source == null) return null; if (!sourceMediaType.match(MediaType.APPLICATION_OBJECT)) { throw new EncodingException("sourceMediaType not conforming to applicatio...
StandardConversions { public static byte[] convertJavaToOctetStream(Object source, MediaType sourceMediaType, Marshaller marshaller) throws IOException, InterruptedException { if (source == null) return null; if (!sourceMediaType.match(MediaType.APPLICATION_OBJECT)) { throw new EncodingException("sourceMediaType not co...
StandardConversions { public static byte[] convertJavaToOctetStream(Object source, MediaType sourceMediaType, Marshaller marshaller) throws IOException, InterruptedException { if (source == null) return null; if (!sourceMediaType.match(MediaType.APPLICATION_OBJECT)) { throw new EncodingException("sourceMediaType not co...
StandardConversions { public static byte[] convertJavaToOctetStream(Object source, MediaType sourceMediaType, Marshaller marshaller) throws IOException, InterruptedException { if (source == null) return null; if (!sourceMediaType.match(MediaType.APPLICATION_OBJECT)) { throw new EncodingException("sourceMediaType not co...
StandardConversions { public static byte[] convertJavaToOctetStream(Object source, MediaType sourceMediaType, Marshaller marshaller) throws IOException, InterruptedException { if (source == null) return null; if (!sourceMediaType.match(MediaType.APPLICATION_OBJECT)) { throw new EncodingException("sourceMediaType not co...
@Test(expectedExceptions = CacheException.class) public void testStringToUnknownKey() { keyTransformationHandler.stringToKey("Z:someKey"); }
public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.substring(2)); case 'D': return...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
@Test(expectedExceptions = CacheException.class) public void testStringToKeyWithInvalidTransformer() { keyTransformationHandler.stringToKey("T:org.infinispan.InexistentTransformer:key1"); }
public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.substring(2)); case 'D': return...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
KeyTransformationHandler { public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': return s.substring(2); case 'I': return Integer.valueOf(s.substring(2)); case 'Y': return Byte.valueOf(s.substring(2)); case 'L': return Long.valueOf(s.substring(2)); case 'X': return Short.valueOf(s.subs...
@Test(expectedExceptions = IllegalArgumentException.class) public void testKeyToStringWithDefaultTransformerForNonSerializableObject() { NonSerializableKey key = new NonSerializableKey("test"); keyTransformationHandler.keyToString(key); }
public String keyToString(Object key) { if (key instanceof byte[]) return "A:" + Base64.getEncoder().encodeToString((byte[]) key); if (key instanceof String) return "S:" + key; else if (key instanceof Integer) return "I:" + key; else if (key instanceof Boolean) return "B:" + key; else if (key instanceof Long) return "L...
KeyTransformationHandler { public String keyToString(Object key) { if (key instanceof byte[]) return "A:" + Base64.getEncoder().encodeToString((byte[]) key); if (key instanceof String) return "S:" + key; else if (key instanceof Integer) return "I:" + key; else if (key instanceof Boolean) return "B:" + key; else if (key...
KeyTransformationHandler { public String keyToString(Object key) { if (key instanceof byte[]) return "A:" + Base64.getEncoder().encodeToString((byte[]) key); if (key instanceof String) return "S:" + key; else if (key instanceof Integer) return "I:" + key; else if (key instanceof Boolean) return "B:" + key; else if (key...
KeyTransformationHandler { public String keyToString(Object key) { if (key instanceof byte[]) return "A:" + Base64.getEncoder().encodeToString((byte[]) key); if (key instanceof String) return "S:" + key; else if (key instanceof Integer) return "I:" + key; else if (key instanceof Boolean) return "B:" + key; else if (key...
KeyTransformationHandler { public String keyToString(Object key) { if (key instanceof byte[]) return "A:" + Base64.getEncoder().encodeToString((byte[]) key); if (key instanceof String) return "S:" + key; else if (key instanceof Integer) return "I:" + key; else if (key instanceof Boolean) return "B:" + key; else if (key...
@Test public void testConvertIdProperty() { assertThat(convertToPropertyType(TestEntity.class, "id", "42")).isEqualTo("42"); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testConvertStringProperty() { assertThat(convertToPropertyType(TestEntity.class, "name", "42")).isEqualTo("42"); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testConvertIntProperty() { assertThat(convertToPropertyType(TestEntity.class, "i", "42")).isEqualTo(42); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testConvertLongProperty() { assertThat(convertToPropertyType(TestEntity.class, "l", "42")).isEqualTo(42L); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testConvertFloatProperty() { assertThat(convertToPropertyType(TestEntity.class, "f", "42.0")).isEqualTo(42.0F); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testConvertDoubleProperty() { assertThat(convertToPropertyType(TestEntity.class, "d", "42.0")).isEqualTo(42.0D); }
@Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToPropertyType(entityType, propertyPath, value); } Class<?> type = f...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public Object convertToPropertyType(Class<?> entityType, String[] propertyPath, String value) { IndexValueFieldDescriptor fieldDescriptor = getValueFieldDescriptor(entityType, propertyPath); if (fieldDescriptor == null) { return super.convertToP...
@Test public void testContainsAll1() throws Exception { Set<Integer> hashSet = new HashSet<>(); hashSet.add(3); assertFalse(es.containsAll(hashSet)); assertTrue(hashSet.containsAll(es)); hashSet.remove(3); assertTrue(hashSet.containsAll(es)); assertTrue(es.containsAll(hashSet)); }
@Override public boolean containsAll(IntSet set) { return set.isEmpty(); }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean containsAll(IntSet set) { return set.isEmpty(); } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean containsAll(IntSet set) { return set.isEmpty(); } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean containsAll(IntSet set) { return set.isEmpty(); } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @O...
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean containsAll(IntSet set) { return set.isEmpty(); } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @O...
@Test public void testRecognizeAnalyzedField() { assertThat(propertyHelper.getIndexedFieldProvider().get(TestEntity.class).isAnalyzed(new String[]{"description"})).isTrue(); }
@Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new SearchFieldIndexingMetadata(indexDescriptor); }; }
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
@Test public void testRecognizeStoredField() { assertThat(propertyHelper.getIndexedFieldProvider().get(TestEntity.class).isStored(new String[]{"description"})).isTrue(); }
@Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new SearchFieldIndexingMetadata(indexDescriptor); }; }
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
@Test public void testRecognizeUnanalyzedField() { assertThat(propertyHelper.getIndexedFieldProvider().get(TestEntity.class).isAnalyzed(new String[]{"i"})).isFalse(); }
@Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new SearchFieldIndexingMetadata(indexDescriptor); }; }
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
HibernateSearchPropertyHelper extends ReflectionPropertyHelper { @Override public IndexedFieldProvider<Class<?>> getIndexedFieldProvider() { return entityType -> { IndexDescriptor indexDescriptor = getIndexDescriptor(entityType); if (indexDescriptor == null) { return IndexedFieldProvider.NO_INDEXING; } return new Searc...
@Test public void testGetSimpleProperty() throws Exception { assertEquals(int.class, ReflectionHelper.getAccessor(Base.class, "prop1").getPropertyType()); assertEquals(float.class, ReflectionHelper.getAccessor(Base.class, "prop2").getPropertyType()); }
public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw new IllegalArgumentE...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
@Test public void testPropertyNotFound() throws Exception { expectedException.expect(ReflectiveOperationException.class); expectedException.expectMessage("Property not found: unknown"); ReflectionHelper.getAccessor(Base.class, "unknown"); }
public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw new IllegalArgumentE...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
@Test public void testGetNestedProperty() throws Exception { ReflectionHelper.PropertyAccessor prop3 = ReflectionHelper.getAccessor(Base.class, "prop3"); assertEquals(Base.class, prop3.getPropertyType()); assertEquals(int.class, prop3.getAccessor("prop1").getPropertyType()); }
public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw new IllegalArgumentE...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
@Test public void testGetMultipleProperty() throws Exception { assertEquals(Base.class, ReflectionHelper.getAccessor(A.class, "array").getPropertyType()); assertEquals(Float.class, ReflectionHelper.getAccessor(A.class, "array2").getPropertyType()); assertEquals(float.class, ReflectionHelper.getAccessor(A.class, "array3...
public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw new IllegalArgumentE...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
ReflectionHelper { public static PropertyAccessor getAccessor(Class<?> clazz, String propertyName) throws ReflectiveOperationException { if (propertyName == null || propertyName.length() == 0) { throw new IllegalArgumentException("Property name cannot be null or empty"); } if (propertyName.indexOf('.') != -1) { throw n...
@Test public void testContains() { assertTrue(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(20)); assertFalse(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(1000)); assertFalse(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(1001)); ass...
public boolean contains(K value) { return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0) && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0); }
Interval { public boolean contains(K value) { return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0) && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0); } }
Interval { public boolean contains(K value) { return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0) && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0); } Interval(K low, boolean includeLower, K up, boolean includeUpper); }
Interval { public boolean contains(K value) { return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0) && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0); } Interval(K low, boolean includeLower, K up, boolean includeUpper); static K getMinusInf(); static K getPlusInf(); boolean c...
Interval { public boolean contains(K value) { return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0) && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0); } Interval(K low, boolean includeLower, K up, boolean includeUpper); static K getMinusInf(); static K getPlusInf(); boolean c...
@Test public void testEmptySum() { DoubleStat sum = new DoubleStat(); assertNull(sum.getSum()); }
Double getSum() { if (count == 0) { return null; } double tmp = sum + sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) { return simpleSum; } else { return tmp; } }
DoubleStat { Double getSum() { if (count == 0) { return null; } double tmp = sum + sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) { return simpleSum; } else { return tmp; } } }
DoubleStat { Double getSum() { if (count == 0) { return null; } double tmp = sum + sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) { return simpleSum; } else { return tmp; } } }
DoubleStat { Double getSum() { if (count == 0) { return null; } double tmp = sum + sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) { return simpleSum; } else { return tmp; } } }
DoubleStat { Double getSum() { if (count == 0) { return null; } double tmp = sum + sumCompensation; if (Double.isNaN(tmp) && Double.isInfinite(simpleSum)) { return simpleSum; } else { return tmp; } } }
@Test public void testEmptyAvg() { DoubleStat avg = new DoubleStat(); assertNull(avg.getAvg()); }
Double getAvg() { return count == 0 ? null : getSum() / count; }
DoubleStat { Double getAvg() { return count == 0 ? null : getSum() / count; } }
DoubleStat { Double getAvg() { return count == 0 ? null : getSum() / count; } }
DoubleStat { Double getAvg() { return count == 0 ? null : getSum() / count; } }
DoubleStat { Double getAvg() { return count == 0 ? null : getSum() / count; } }
@Test public void testIntStream() throws Exception { assertEquals(0, es.intStream().count()); }
@Override public IntStream intStream() { return IntStream.empty(); }
EmptyIntSet extends AbstractImmutableIntSet { @Override public IntStream intStream() { return IntStream.empty(); } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public IntStream intStream() { return IntStream.empty(); } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public IntStream intStream() { return IntStream.empty(); } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Overrid...
EmptyIntSet extends AbstractImmutableIntSet { @Override public IntStream intStream() { return IntStream.empty(); } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Overrid...
@Test public void testDegeneratedEquals() { LikeCondition likeCondition = new LikeCondition("ab"); assertTrue(likeCondition.match("ab")); assertFalse(likeCondition.match("ac")); assertFalse(likeCondition.match("XabY")); }
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testDegeneratedContains() { LikeCondition likeCondition = new LikeCondition("%ab%"); assertTrue(likeCondition.match("ab")); assertTrue(likeCondition.match("xabxx")); assertFalse(likeCondition.match("axb")); }
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testDegeneratedStartsWith() { assertTrue(new LikeCondition("ab%").match("ab")); assertTrue(new LikeCondition("ab%").match("abx")); assertTrue(new LikeCondition("ab%").match("abxx")); assertFalse(new LikeCondition("ab%").match("xab")); assertFalse(new LikeCondition("ab%").match("axb")); assertTrue(new ...
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testDegeneratedEndsWith() { assertTrue(new LikeCondition("%ab").match("ab")); assertTrue(new LikeCondition("%ab").match("xab")); assertTrue(new LikeCondition("%ab").match("xxab")); assertFalse(new LikeCondition("%ab").match("abx")); assertFalse(new LikeCondition("%ab").match("axb")); assertTrue(new Li...
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testSingleCharWildcard() { LikeCondition likeCondition = new LikeCondition("a_b_c"); assertTrue(likeCondition.match("aXbYc")); assertTrue(likeCondition.match("a_b_c")); assertTrue(likeCondition.match("a%b%c")); assertFalse(likeCondition.match("abc")); assertFalse(likeCondition.match("aXXbYYc")); }
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testMultipleCharWildcard() { LikeCondition likeCondition = new LikeCondition("a%b%c"); assertTrue(likeCondition.match("abc")); assertTrue(likeCondition.match("aXbc")); assertTrue(likeCondition.match("aXYbZc")); assertTrue(likeCondition.match("a_b_c")); assertTrue(likeCondition.match("a%b%c")); assertF...
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testEscapeChar() { assertTrue(new LikeCondition("a\\%b").match("a%b")); assertFalse(new LikeCondition("a\\%b").match("aXb")); assertFalse(new LikeCondition("a\\%b").match("ab")); assertTrue(new LikeCondition("a\\\\b").match("a\\b")); assertTrue(new LikeCondition("a~%b", '~').match("a%b")); assertFalse...
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testPlusEscaping() { LikeCondition likeCondition = new LikeCondition("a%aZ+"); assertTrue(likeCondition.match("aaaZ+")); assertFalse(likeCondition.match("aaa")); assertFalse(likeCondition.match("aaaZ")); assertFalse(likeCondition.match("aaaZZ")); assertFalse(likeCondition.match("aaaZZZ")); }
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testAsteriskEscaping() { LikeCondition likeCondition = new LikeCondition("a%aZ*"); assertTrue(likeCondition.match("aaaZ*")); assertFalse(likeCondition.match("aaa")); assertFalse(likeCondition.match("aaaZ")); assertFalse(likeCondition.match("aaaZZ")); assertFalse(likeCondition.match("aaaZZZ")); }
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testGeneralMetacharEscaping() { assertTrue(new LikeCondition("a%(b").match("aaa(b")); assertTrue(new LikeCondition("a%)b").match("aaa)b")); assertTrue(new LikeCondition("a%[b").match("aaa[b")); assertTrue(new LikeCondition("a%]b").match("aaa]b")); assertTrue(new LikeCondition("a%{b").match("aaa{b")); ...
@Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(value); case EndsWith: return (length == -1 || ...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
LikeCondition implements Condition<String> { @Override public boolean match(String attributeValue) { if (attributeValue == null) { return false; } switch (type) { case Equals: return attributeValue.equals(value); case StartsWith: return (length == -1 || length == attributeValue.length()) && attributeValue.startsWith(va...
@Test public void testEquals() throws Exception { IntSet sis2 = new SingletonIntSet(4); assertNotEquals(es, sis2); assertNotEquals(sis2, es); IntSet sis3 = new SmallIntSet(2); assertEquals(sis3, es); assertEquals(es, sis3); }
@Override public boolean equals(Object obj) { if (obj instanceof Set) { return ((Set) obj).size() == 0; } return false; }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean equals(Object obj) { if (obj instanceof Set) { return ((Set) obj).size() == 0; } return false; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean equals(Object obj) { if (obj instanceof Set) { return ((Set) obj).size() == 0; } return false; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean equals(Object obj) { if (obj instanceof Set) { return ((Set) obj).size() == 0; } return false; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEm...
EmptyIntSet extends AbstractImmutableIntSet { @Override public boolean equals(Object obj) { if (obj instanceof Set) { return ((Set) obj).size() == 0; } return false; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEm...
@Test(expectedExceptions = CacheConfigurationException.class, expectedExceptionsMessageRegExp = "ISPN(\\d)*: Invalid max_retries \\(value=-1\\). " + "Value should be greater or equal than zero.") public void testNegativeRetriesPerServer() { ConfigurationBuilder builder = HotRodClientTestingUtil.newRemoteConfigurationBu...
public int maxRetries() { return maxRetries; }
Configuration { public int maxRetries() { return maxRetries; } }
Configuration { public int maxRetries() { return maxRetries; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfiguration connect...
Configuration { public int maxRetries() { return maxRetries; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfiguration connect...
Configuration { public int maxRetries() { return maxRetries; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfiguration connect...
@Test(expectedExceptions = CacheConfigurationException.class) public void testInvalidAuthenticationConfig() { ConfigurationBuilder builder = HotRodClientTestingUtil.newRemoteConfigurationBuilder(); builder.security().authentication().enable().saslMechanism("PLAIN"); builder.build(); }
public SecurityConfiguration security() { return security; }
Configuration { public SecurityConfiguration security() { return security; } }
Configuration { public SecurityConfiguration security() { return security; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfigu...
Configuration { public SecurityConfiguration security() { return security; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfigu...
Configuration { public SecurityConfiguration security() { return security; } Configuration(ExecutorFactoryConfiguration asyncExecutorFactory, Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory, ClassLoader classLoader, ClientIntelligence clientIntelligence, ConnectionPoolConfigu...
@Test(groups = "stress") public void testConcurrentWrite() throws InterruptedException { final int THREADS = 8; final AtomicBoolean run = new AtomicBoolean(true); final AtomicInteger written = new AtomicInteger(); final CountDownLatch started = new CountDownLatch(THREADS); final CountDownLatch finished = new CountDownL...
@Override public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ? extends V> entry) { return handler.write(segment, entry); }
RocksDBStore implements NonBlockingStore<K, V> { @Override public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ? extends V> entry) { return handler.write(segment, entry); } }
RocksDBStore implements NonBlockingStore<K, V> { @Override public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ? extends V> entry) { return handler.write(segment, entry); } }
RocksDBStore implements NonBlockingStore<K, V> { @Override public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ? extends V> entry) { return handler.write(segment, entry); } @Override CompletionStage<Void> start(InitializationContext ctx); @Override CompletionStage<Void> stop(); @Override Set...
RocksDBStore implements NonBlockingStore<K, V> { @Override public CompletionStage<Void> write(int segment, MarshallableEntry<? extends K, ? extends V> entry) { return handler.write(segment, entry); } @Override CompletionStage<Void> start(InitializationContext ctx); @Override CompletionStage<Void> stop(); @Override Set...
@Test(expectedExceptions = CacheConfigurationException.class) public void testL1WithExceptionEviction() { Configuration config = new ConfigurationBuilder() .clustering() .cacheMode(CacheMode.DIST_SYNC) .l1().enable() .memory() .evictionStrategy(EvictionStrategy.EXCEPTION) .size(10) .transaction() .transactionMode(org.i...
public L1ConfigurationBuilder enable() { attributes.attribute(ENABLED).set(true); return this; }
L1ConfigurationBuilder extends AbstractClusteringConfigurationChildBuilder implements Builder<L1Configuration>, ConfigurationBuilderInfo { public L1ConfigurationBuilder enable() { attributes.attribute(ENABLED).set(true); return this; } }
L1ConfigurationBuilder extends AbstractClusteringConfigurationChildBuilder implements Builder<L1Configuration>, ConfigurationBuilderInfo { public L1ConfigurationBuilder enable() { attributes.attribute(ENABLED).set(true); return this; } L1ConfigurationBuilder(ClusteringConfigurationBuilder builder); }
L1ConfigurationBuilder extends AbstractClusteringConfigurationChildBuilder implements Builder<L1Configuration>, ConfigurationBuilderInfo { public L1ConfigurationBuilder enable() { attributes.attribute(ENABLED).set(true); return this; } L1ConfigurationBuilder(ClusteringConfigurationBuilder builder); @Override ElementDef...
L1ConfigurationBuilder extends AbstractClusteringConfigurationChildBuilder implements Builder<L1Configuration>, ConfigurationBuilderInfo { public L1ConfigurationBuilder enable() { attributes.attribute(ENABLED).set(true); return this; } L1ConfigurationBuilder(ClusteringConfigurationBuilder builder); @Override ElementDef...
@Test public void testEmpty() throws CyclicDependencyException { assertTrue(new DependencyGraph().topologicalSort().isEmpty()); }
public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = incoming.getValue(...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
@Test public void testConcurrentAccess() throws Exception { DependencyGraph<String> graph = new DependencyGraph<>(); ExecutorService service = Executors.newCachedThreadPool(getTestThreadFactory("Worker")); try { CountDownLatch startLatch = new CountDownLatch(1); int threads = 20; ArrayList<Future<?>> futures = new Arra...
public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = incoming.getValue(...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
DependencyGraph { public List<T> topologicalSort() throws CyclicDependencyException { lock.readLock().lock(); try { ArrayList<T> result = new ArrayList<>(); Deque<T> noIncomingEdges = new ArrayDeque<>(); Map<T, Integer> temp = new HashMap<>(); for (Map.Entry<T, Set<T>> incoming : incomingEdges.entrySet()) { int size = ...
@Test public void testRemoveDependency() throws CyclicDependencyException { DependencyGraph<String> g = new DependencyGraph<>(); g.addDependency("E", "B"); g.addDependency("E", "C"); g.addDependency("E", "D"); g.addDependency("B", "D"); g.addDependency("B", "C"); g.addDependency("C", "D"); assertEquals(g.topologicalSor...
public void removeDependency(T from, T to) { lock.writeLock().lock(); try { Set<T> dependencies = outgoingEdges.get(from); if (dependencies == null || !dependencies.contains(to)) { throw new IllegalArgumentException("Inexistent dependency"); } dependencies.remove(to); incomingEdges.get(to).remove(from); } finally { loc...
DependencyGraph { public void removeDependency(T from, T to) { lock.writeLock().lock(); try { Set<T> dependencies = outgoingEdges.get(from); if (dependencies == null || !dependencies.contains(to)) { throw new IllegalArgumentException("Inexistent dependency"); } dependencies.remove(to); incomingEdges.get(to).remove(from...
DependencyGraph { public void removeDependency(T from, T to) { lock.writeLock().lock(); try { Set<T> dependencies = outgoingEdges.get(from); if (dependencies == null || !dependencies.contains(to)) { throw new IllegalArgumentException("Inexistent dependency"); } dependencies.remove(to); incomingEdges.get(to).remove(from...
DependencyGraph { public void removeDependency(T from, T to) { lock.writeLock().lock(); try { Set<T> dependencies = outgoingEdges.get(from); if (dependencies == null || !dependencies.contains(to)) { throw new IllegalArgumentException("Inexistent dependency"); } dependencies.remove(to); incomingEdges.get(to).remove(from...
DependencyGraph { public void removeDependency(T from, T to) { lock.writeLock().lock(); try { Set<T> dependencies = outgoingEdges.get(from); if (dependencies == null || !dependencies.contains(to)) { throw new IllegalArgumentException("Inexistent dependency"); } dependencies.remove(to); incomingEdges.get(to).remove(from...
@Test(expectedExceptions = IllegalArgumentException.class) public void testAddSelf() { new DependencyGraph<>().addDependency("N", "N"); }
public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } List<T> to...
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } List<T> to...
@Test(expectedExceptions = IllegalArgumentException.class) public void testAdNull() { new DependencyGraph<>().addDependency("N", null); }
public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } }
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } List<T> to...
DependencyGraph { public void addDependency(T from, T to) { if (from == null || to == null || from.equals(to)) { throw new IllegalArgumentException("Invalid parameters"); } lock.writeLock().lock(); try { if (addOutgoingEdge(from, to)) { addIncomingEdge(to, from); } } finally { lock.writeLock().unlock(); } } List<T> to...
@Test(expectedExceptions = IOException.class) public void testCreateNewFileInNonExistentDir() throws IOException { File file = fs.getFile("nonExistent/file.txt"); file.createNewFile(); }
@Override public boolean createNewFile() throws IOException { if (exists()) return false; if (!checkParentDirs(getAbsolutePath(), false)) throw new IOException("Cannot create file " + getAbsolutePath() + " (parent dir does not exist)"); metadataCache.put(getAbsolutePath(), new Metadata(0, System.currentTimeMillis(), ch...
GridFile extends File { @Override public boolean createNewFile() throws IOException { if (exists()) return false; if (!checkParentDirs(getAbsolutePath(), false)) throw new IOException("Cannot create file " + getAbsolutePath() + " (parent dir does not exist)"); metadataCache.put(getAbsolutePath(), new Metadata(0, System...
GridFile extends File { @Override public boolean createNewFile() throws IOException { if (exists()) return false; if (!checkParentDirs(getAbsolutePath(), false)) throw new IOException("Cannot create file " + getAbsolutePath() + " (parent dir does not exist)"); metadataCache.put(getAbsolutePath(), new Metadata(0, System...
GridFile extends File { @Override public boolean createNewFile() throws IOException { if (exists()) return false; if (!checkParentDirs(getAbsolutePath(), false)) throw new IOException("Cannot create file " + getAbsolutePath() + " (parent dir does not exist)"); metadataCache.put(getAbsolutePath(), new Metadata(0, System...
GridFile extends File { @Override public boolean createNewFile() throws IOException { if (exists()) return false; if (!checkParentDirs(getAbsolutePath(), false)) throw new IOException("Cannot create file " + getAbsolutePath() + " (parent dir does not exist)"); metadataCache.put(getAbsolutePath(), new Metadata(0, System...
@Test public void testForEachPrimitive() { Set<Integer> results = new HashSet<>(); es.forEach((IntConsumer) results::add); assertEquals(0, results.size()); }
@Override public int size() { return 0; }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override PrimitiveIterator.OfInt i...
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override PrimitiveIterator.OfInt i...
@Test(expectedExceptions = FileNotFoundException.class) public void testWritingToDirectoryThrowsException2() throws IOException { File dir = createDir(); fs.getOutput(dir.getPath()); }
@Override public String getPath() { return path; }
GridFile extends File { @Override public String getPath() { return path; } }
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
@Test(expectedExceptions = FileNotFoundException.class) public void testReadingFromDirectoryThrowsException2() throws IOException { File dir = createDir(); fs.getInput(dir.getPath()); }
@Override public String getPath() { return path; }
GridFile extends File { @Override public String getPath() { return path; } }
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
GridFile extends File { @Override public String getPath() { return path; } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(File parent, String ...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testDeleteOnExit() { fs.getFile("nonsuch.txt").deleteOnExit(); }
@Override public void deleteOnExit() { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public void deleteOnExit() { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public void deleteOnExit() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, G...
GridFile extends File { @Override public void deleteOnExit() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, G...
GridFile extends File { @Override public void deleteOnExit() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, G...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testRenameTo(){ fs.getFile("file.txt").renameTo(null); }
@Override public boolean renameTo(File dest) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean renameTo(File dest) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean renameTo(File dest) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chun...
GridFile extends File { @Override public boolean renameTo(File dest) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chun...
GridFile extends File { @Override public boolean renameTo(File dest) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chun...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testGetCanonicalPath() throws IOException { fs.getFile("nonsuch.txt").getCanonicalPath(); }
@Override public String getCanonicalPath() throws IOException { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public String getCanonicalPath() throws IOException { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public String getCanonicalPath() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metada...
GridFile extends File { @Override public String getCanonicalPath() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metada...
GridFile extends File { @Override public String getCanonicalPath() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metada...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testGetCanonicalFile() throws IOException { fs.getFile("nonsuch.txt").getCanonicalFile(); }
@Override public File getCanonicalFile() throws IOException { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public File getCanonicalFile() throws IOException { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public File getCanonicalFile() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadata...
GridFile extends File { @Override public File getCanonicalFile() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadata...
GridFile extends File { @Override public File getCanonicalFile() throws IOException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadata...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testToURL() throws MalformedURLException { fs.getFile("nonsuch.txt").toURL(); }
@Override public URL toURL() throws MalformedURLException { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public URL toURL() throws MalformedURLException { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public URL toURL() throws MalformedURLException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCa...
GridFile extends File { @Override public URL toURL() throws MalformedURLException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCa...
GridFile extends File { @Override public URL toURL() throws MalformedURLException { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCa...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testToURI() { fs.getFile("nonsuch.txt").toURI(); }
@Override public URI toURI() { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public URI toURI() { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public URI toURI() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFiles...
GridFile extends File { @Override public URI toURI() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFiles...
GridFile extends File { @Override public URI toURI() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize, GridFiles...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetReadOnly() { fs.getFile("nonsuch.txt").setReadOnly(); }
@Override public boolean setReadOnly() { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setReadOnly() { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setReadOnly() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize,...
GridFile extends File { @Override public boolean setReadOnly() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize,...
GridFile extends File { @Override public boolean setReadOnly() { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Metadata> metadataCache, int chunkSize,...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetWritable() { fs.getFile("nonsuch.txt").setWritable(true); }
@Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
@Test public void testForEachObject() { Set<Integer> results = new HashSet<>(); es.forEach((Consumer<? super Integer>) results::add); assertEquals(0, results.size()); }
@Override public int size() { return 0; }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } }
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override PrimitiveIterator.OfInt i...
EmptyIntSet extends AbstractImmutableIntSet { @Override public int size() { return 0; } static IntSet getInstance(); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override PrimitiveIterator.OfInt i...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetWritable2() { fs.getFile("nonsuch.txt").setWritable(true, true); }
@Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setWritable(boolean writable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetReadable() { fs.getFile("nonsuch.txt").setReadable(true); }
@Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetReadable2() { fs.getFile("nonsuch.txt").setReadable(true, true); }
@Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
GridFile extends File { @Override public boolean setReadable(boolean readable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, Meta...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetExecutable() { fs.getFile("nonsuch.txt").setExecutable(true); }
@Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...
@Test(expectedExceptions = UnsupportedOperationException.class) public void testSetExecutable2() { fs.getFile("nonsuch.txt").setExecutable(true, true); }
@Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); }
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } }
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...
GridFile extends File { @Override public boolean setExecutable(boolean executable, boolean ownerOnly) { throw new UnsupportedOperationException("Not implemented"); } GridFile(String pathname, Cache<String, Metadata> metadataCache, int chunkSize, GridFilesystem fs); GridFile(String parent, String child, Cache<String, ...