Java Code Examples for com.alibaba.otter.canal.protocol.CanalEntry.EntryType#TRANSACTIONEND
The following examples show how to use
com.alibaba.otter.canal.protocol.CanalEntry.EntryType#TRANSACTIONEND .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DummyEventStore.java From canal-1.1.3 with Apache License 2.0 | 6 votes |
public void put(List<Event> datas) throws InterruptedException, CanalStoreException { for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } }
Example 2
Source File: DummyEventStore.java From canal-1.1.3 with Apache License 2.0 | 6 votes |
public boolean put(List<Event> datas, long timeout, TimeUnit unit) throws InterruptedException, CanalStoreException { for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } return true; }
Example 3
Source File: DummyEventStore.java From canal-1.1.3 with Apache License 2.0 | 6 votes |
public boolean tryPut(List<Event> datas) throws CanalStoreException { System.out.println("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); return true; }
Example 4
Source File: DummyEventStore.java From canal with Apache License 2.0 | 6 votes |
public void put(List<Event> datas) throws InterruptedException, CanalStoreException { for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } }
Example 5
Source File: DummyEventStore.java From canal with Apache License 2.0 | 6 votes |
public boolean put(List<Event> datas, long timeout, TimeUnit unit) throws InterruptedException, CanalStoreException { for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } return true; }
Example 6
Source File: DummyEventStore.java From canal with Apache License 2.0 | 6 votes |
public boolean tryPut(List<Event> datas) throws CanalStoreException { System.out.println("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); for (Event data : datas) { Date date = new Date(data.getExecuteTime()); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); if (data.getEntryType() == EntryType.TRANSACTIONBEGIN || data.getEntryType() == EntryType.TRANSACTIONEND) { // System.out.println(MessageFormat.format(messgae, new Object[] // { Thread.currentThread().getName(), // header.getLogfilename(), header.getLogfileoffset(), // format.format(date), // data.getEntry().getEntryType(), "" })); System.out.println(data.getEntryType()); } else { System.out.println(MessageFormat.format(messgae, new Object[] { Thread.currentThread().getName(), data.getJournalName(), String.valueOf(data.getPosition()), format.format(date) })); } } System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); return true; }
Example 7
Source File: TimelineTransactionBarrier.java From canal-1.1.3 with Apache License 2.0 | 4 votes |
private boolean isTransactionEnd(Event event) { return event.getEntryType() == EntryType.TRANSACTIONEND; }
Example 8
Source File: TimelineTransactionBarrier.java From canal with Apache License 2.0 | 4 votes |
private boolean isTransactionEnd(Event event) { return event.getEntryType() == EntryType.TRANSACTIONEND; }