com.tc.util.Assert.assertFalse()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(205)

本文整理了Java中com.tc.util.Assert.assertFalse()方法的一些代码示例,展示了Assert.assertFalse()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.assertFalse()方法的具体详情如下:
包路径:com.tc.util.Assert
类名称:Assert
方法名:assertFalse

Assert.assertFalse介绍

[英]Evaluate the boolean exception and throw an assertion error if true
[中]计算布尔异常,如果为true,则抛出断言错误

代码示例

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public SequenceID getSequenceID() {
 Assert.assertFalse(this.seqID.isNull());
 return this.seqID;
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public SequenceID getSequenceID() {
 Assert.assertFalse(this.seqID.isNull());
 return this.seqID;
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public SequenceID getSequenceID() {
 Assert.assertFalse(this.seqID.isNull());
 return this.seqID;
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public SequenceID getSequenceID() {
 Assert.assertFalse(this.seqID.isNull());
 return this.seqID;
}

代码示例来源:origin: org.terracotta/terracotta-l1

@Override
public SequenceID getSequenceID() {
 Assert.assertFalse(this.seqID.isNull());
 return this.seqID;
}

代码示例来源:origin: org.terracotta/terracotta-l1

public synchronized void initSequence(Object key, Collection sequenceIDs) {
 Assert.assertFalse(this.sequences.containsKey(key));
 this.sequences.put(key, new Sequencer(key, this.start, sequenceIDs));
}

代码示例来源:origin: org.terracotta/terracotta-ee

public synchronized void initSequence(Object key, Collection sequenceIDs) {
 Assert.assertFalse(this.sequences.containsKey(key));
 this.sequences.put(key, new Sequencer(key, this.start, sequenceIDs));
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

public synchronized void initSequence(Object key, Collection sequenceIDs) {
 Assert.assertFalse(this.sequences.containsKey(key));
 this.sequences.put(key, new Sequencer(key, this.start, sequenceIDs));
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public synchronized void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                       final ClientHandshakeMessage handshakeMessage) {
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 if (isStopped()) { return; }
 State state = this.stateMap.get(remoteNode);
 if (!(state == State.PAUSED || state == State.REJOIN_IN_PROGRESS)) { throw new AssertionError(
                                                "Attempt to init handshake while "
                                                  + state); }
 this.stateMap.put((GroupID) remoteNode, State.STARTING);
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public synchronized void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                       final ClientHandshakeMessage handshakeMessage) {
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 if (isStopped()) { return; }
 State state = this.stateMap.get(remoteNode);
 if (!(state == State.PAUSED || state == State.REJOIN_IN_PROGRESS)) { throw new AssertionError(
                                                "Attempt to init handshake while "
                                                  + state); }
 this.stateMap.put((GroupID) remoteNode, State.STARTING);
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                final ClientHandshakeMessage handshakeMessage) {
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 final T manager = this.groupIdManagerMapping.get(remoteNode);
 manager.initializeHandshake(thisNode, remoteNode, handshakeMessage);
}

代码示例来源:origin: org.terracotta/terracotta-ee

private void checkVariableHeaderEmpty() {
 Assert.assertEquals(0, actionCount);
 Assert.assertFalse(Conversion.getFlag(flags, DNA.HAS_PARENT_ID));
 Assert.assertFalse(Conversion.getFlag(flags, DNA.HAS_ARRAY_LENGTH));
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

private void checkVariableHeaderEmpty() {
 Assert.assertEquals(0, actionCount);
 Assert.assertFalse(Conversion.getFlag(flags, DNA.HAS_PARENT_ID));
 Assert.assertFalse(Conversion.getFlag(flags, DNA.HAS_ARRAY_LENGTH));
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                final ClientHandshakeMessage handshakeMessage) {
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 final T manager = this.groupIdManagerMapping.get(remoteNode);
 manager.initializeHandshake(thisNode, remoteNode, handshakeMessage);
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public void incomingTransactions(Set txnIDs) {
 Assert.assertFalse(this.dead);
 for (final Iterator i = txnIDs.iterator(); i.hasNext();) {
  final ServerTransactionID stxnID = (ServerTransactionID) i.next();
  createRecord(stxnID.getClientTransactionID(), new TransactionRecord());
 }
}

代码示例来源:origin: org.terracotta/terracotta-ee

private int basicClearReferences(final int toClear) {
 final Object po = getPeerObject();
 Assert.assertFalse(isNew()); // Shouldn't clear new Objects
 if (po == null) { return 0; }
 return clearReferences(po, toClear);
}

代码示例来源:origin: org.terracotta/terracotta-ee

protected void addHolder(ServerLockContext request, LockHelper helper) {
 preStepsForAdd(helper);
 Assert.assertFalse(checkDuplicate(request));
 this.addFirst(request);
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                final ClientHandshakeMessage handshakeMessage) {
 if (this.isShutdown) { return; }
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 final RemoteTransactionManager rtm = getRemoteTransactionManager((GroupID) remoteNode);
 rtm.initializeHandshake(thisNode, remoteNode, handshakeMessage);
 this.hwmm.initializeHandshake((GroupID) remoteNode, handshakeMessage);
}

代码示例来源:origin: org.terracotta/terracotta-l1-ee

@Override
public void initializeHandshake(final NodeID thisNode, final NodeID remoteNode,
                final ClientHandshakeMessage handshakeMessage) {
 if (this.isShutdown) { return; }
 Assert.assertFalse(GroupID.ALL_GROUPS.equals(remoteNode));
 final RemoteTransactionManager rtm = getRemoteTransactionManager((GroupID) remoteNode);
 rtm.initializeHandshake(thisNode, remoteNode, handshakeMessage);
 this.hwmm.initializeHandshake((GroupID) remoteNode, handshakeMessage);
}

代码示例来源:origin: org.terracotta/terracotta-ee

@Override
public TransactionBuffer receivedAcknowledgement(final SessionID sessionID, final TransactionID txID,
                         final NodeID remoteNode) {
 final GroupID gid = (GroupID) remoteNode;
 final TransactionBufferForGroups tb = (TransactionBufferForGroups) getRemoteTransactionManager(gid)
   .receivedAcknowledgement(sessionID, txID, remoteNode);
 if (tb != null) {
  final long[] highWaterMark = tb.getHighWaterMarkForGroups();
  Assert.assertFalse("should not receive ACK after rejoin from " + remoteNode + " txnId " + txID,
            hwmm.isCleanedUp());
  hwmm.incrementHighWaterMarkKnownToServer(gid, highWaterMark);
 }
 return tb;
}

相关文章