Tabnine Logo
CommitLog.start
Code IndexAdd Tabnine to your IDE (free)

How to use
start
method
in
org.apache.rocketmq.store.CommitLog

Best Java code snippets using org.apache.rocketmq.store.CommitLog.start (Showing top 3 results out of 315)

origin: apache/rocketmq

/**
 * @throws Exception
 */
public void start() throws Exception {
  lock = lockFile.getChannel().tryLock(0, 1, false);
  if (lock == null || lock.isShared() || !lock.isValid()) {
    throw new RuntimeException("Lock failed,MQ already started");
  }
  lockFile.getChannel().write(ByteBuffer.wrap("lock".getBytes()));
  lockFile.getChannel().force(true);
  this.flushConsumeQueueService.start();
  this.commitLog.start();
  this.storeStatsService.start();
  if (this.scheduleMessageService != null && SLAVE != messageStoreConfig.getBrokerRole()) {
    this.scheduleMessageService.start();
  }
  if (this.getMessageStoreConfig().isDuplicationEnable()) {
    this.reputMessageService.setReputFromOffset(this.commitLog.getConfirmOffset());
  } else {
    this.reputMessageService.setReputFromOffset(this.commitLog.getMaxOffset());
  }
  this.reputMessageService.start();
  this.haService.start();
  this.createTempFile();
  this.addScheduleTask();
  this.shutdown = false;
}
origin: didi/DDMQ

/**
 * @throws Exception
 */
public void start() throws Exception {
  lock = lockFile.getChannel().tryLock(0, 1, false);
  if (lock == null || lock.isShared() || !lock.isValid()) {
    throw new RuntimeException("Lock failed,MQ already started");
  }
  lockFile.getChannel().write(ByteBuffer.wrap("lock".getBytes()));
  lockFile.getChannel().force(true);
  this.flushConsumeQueueService.start();
  this.commitLog.start();
  this.storeStatsService.start();
  if (this.scheduleMessageService != null && BrokerRole.SLAVE != messageStoreConfig.getBrokerRole()) {
    this.scheduleMessageService.start();
  }
  if (this.getMessageStoreConfig().isDuplicationEnable()) {
    this.reputMessageService.setReputFromOffset(this.commitLog.getConfirmOffset());
  } else {
    this.reputMessageService.setReputFromOffset(this.commitLog.getMaxOffset());
  }
  this.reputMessageService.start();
  this.haService.start();
  this.createTempFile();
  this.addScheduleTask();
  if (BrokerRole.SLAVE != messageStoreConfig.getBrokerRole()) {
    this.haService.initInSyncOffset(getMaxPhyOffset());
  }
  this.shutdown = false;
}
origin: org.apache.rocketmq/rocketmq-store

/**
 * @throws Exception
 */
public void start() throws Exception {
  lock = lockFile.getChannel().tryLock(0, 1, false);
  if (lock == null || lock.isShared() || !lock.isValid()) {
    throw new RuntimeException("Lock failed,MQ already started");
  }
  lockFile.getChannel().write(ByteBuffer.wrap("lock".getBytes()));
  lockFile.getChannel().force(true);
  this.flushConsumeQueueService.start();
  this.commitLog.start();
  this.storeStatsService.start();
  if (this.scheduleMessageService != null && SLAVE != messageStoreConfig.getBrokerRole()) {
    this.scheduleMessageService.start();
  }
  if (this.getMessageStoreConfig().isDuplicationEnable()) {
    this.reputMessageService.setReputFromOffset(this.commitLog.getConfirmOffset());
  } else {
    this.reputMessageService.setReputFromOffset(this.commitLog.getMaxOffset());
  }
  this.reputMessageService.start();
  this.haService.start();
  this.createTempFile();
  this.addScheduleTask();
  this.shutdown = false;
}
org.apache.rocketmq.storeCommitLogstart

Popular methods of CommitLog

  • <init>
  • appendData
  • calMsgLength
  • checkMessageAndReturnSize
    check the message and returns the message size
  • checkSelf
  • deleteExpiredFile
  • destroy
  • doNothingForDeadCode
  • flush
  • getBeginTimeInLock
  • getConfirmOffset
  • getData
  • getConfirmOffset,
  • getData,
  • getMaxOffset,
  • getMessage,
  • getMinOffset,
  • handleDiskFlush,
  • handleHA,
  • isMappedFileMatchedRecover,
  • load,
  • lockTimeMills

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Notification (javax.management)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now