Inclusion Criteria:  Histologically documented primary central nervous system(CNS) lymphoma or secondary diffuse large B-cell lymphoma (DLBCL) isolated to CNS. Relapsed or refractory disease with at least 1 prior methotrexate-based therapy Participant must be able to understand and willing to sign a written informed consent document. Participant must have signed and dated written informed consent form in accordance with regulatory and institutional guidelines. This must be obtained before the performance of any protocol-related procedures that are not part of normal subject care. Participant must be willing and able to comply with scheduled visits, treatment schedule, laboratory tests, and other requirements of the study. Participant must be at least 18 years old on day of signing informed consent. PCNSL subjects should have evidence of measurable or evaluable enhancing disease on MRI Able to submit at least 10 but up to 20 unstained formalin-fixed, paraffin-embedded (FFPE) slides from the initial or most recent tissue diagnosis for correlative studies. Histologically confirmed tissue will be required from the time of relapse or at the time of initial surgery. If tissue is unavailable and/or diagnosis was made from cerebrospinal fluid or vitreal biopsy, approval from the overall principal investigator is needed. Eastern Cooperative Oncology Group (ECOG) performance status of 0 to 3. Life expectancy of >3 months (in the opinion of the investigator) Toxicities due to prior therapy must be stable and recovered to ≤ Grade 1 Must be able to tolerate lumbar puncture and MRI/CT.  Demonstrate adequate organ function as defined below, all screening labs should be performed within 14 days of treatment initiation.  Absolute neutrophil count (ANC) ≥ 1.0 x 109/L Platelets ≥ 75 x 10^9/L and no platelet transfusion within the past 7 days prior to initiation of protocol treatment Prothrombin time (PT), partial thromboplastin time (PTT), and international normalized ratio (INR) < 2 times the upper limit of normal Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) ≤ 2.5 times the upper limit of normal Serum bilirubin ≤ 1.5 times the upper limit of normal Creatinine clearance > 30 mL/min calculated by the Cockcroft-Gault formula using actual body weight Women of child-bearing potential, must agree to use a highly effective method of contraception consistently and correctly as described below during study treatment and for 120 days after study discontinuation. Male participants must agree to use at least one of the following methods of contraception starting with the first dose of study therapy through 120 days after the last dose of therapy: Ability to swallow oral medications.  Exclusion Criteria:  CNSL with systematic disease. The pathological diagnosis was T-cell lymphoma. Prior chemotherapy within 4 weeks or prior targeted small molecule therapy within 2 weeks , prior antibody-drug-conjugates within 10weeks, autologous stem cell transplant within 6 months, prior to the first day of study treatment, prior to the first day of study treatment. Prior allogenic stem cell transplant. Participation in another clinical study with an investigational product during the 4 weeks prior to the first day of study treatment. External beam radiation therapy to the CNS within 14 days of the first day of study treatment. Patient requires more than 8 mg of dexamethasone daily or the equivalent for control of CNS symptoms at the time of initiation of study therapy. Patients must taper off high dose corticosteroids for the control of CNS symptoms within 14 days after starting on study therapy. History of intracranial hemorrhage or clinically significant stroke within 6 months prior to first day of study treatment History of significant gastrointestinal disease that would limit absorption of oral medications. Active concurrent malignancy requiring active therapy. Prior therapy with a checkpoint inhibitor or BTK inhibitor. Warfarin or any other Coumadin-derivative anticoagulant or vitamin K antagonists. Patients must be off warfarin-derivative anticoagulants for at least seven days prior to starting the study drug. Use of low molecular weight heparin and novel oral anticoagulants (eg. rivaroxaban, apixaban) is permitted if required. Concurrent use of a moderate or strong inhibitor or inducer of the P450 isoenzyme CYP3A. Participants must be off P450/CYP3A inhibitors and inducers prior to starting the study drug. Receipt of live attenuated vaccine within 30 days prior to the first day of study treatment. Note: Patients, if enrolled, should not receive live vaccine while receiving IP and up to 30 days after the last day of study treatment. Suspicion of or confirmed progressive multifocal leukoencephalopathy  Active autoimmune disease (including autoimmune hemolytic anemia and immune thrombocytopenia purpura) requiring systemic treatment within the past two years (i.e. with the use of disease modifying agents, corticosteroids, or immunosuppressive drugs). The following are exceptions to this criterion:  Patients with vitiligo or alopecia Patients with hypothyroidism (e.g., due to Hashimoto syndrome) stable on hormone replacement Any chronic skin condition that does not require systemic therapy Patients without active disease in the last 5 years may be included but only after consultation with the study physician Patients with celiac disease controlled by diet alone Replacement therapy (e.g. thyroxine, insulin, or physiologic corticosteroids replacement therapy for adrenal or pituitary insufficiency, etc.) Significant medical diseases or conditions, as assessed by the investigator, that would substantially increase the risk to benefit ratio of participating in the study. This includes, but is not limited to, acute myocardial infarction in the past 6 months, unstable angina, uncontrolled diabetes mellitus, significant active infections, severely immunocompromised state, and congestive heart failure, New York Heart Association Class III-IV. Known bleeding diathesis (e.g. von Willebrand's disease), hemophilia, or active bleeding. Known Human immunodeficiency virus (HIV) infection. Known active infection with hepatitis C virus (HCV) or hepatitis B virus (HBV) as determined by serologic tests and/or PCR. History of invasive fungal infection, including invasive aspergillosis, or known active tuberculosis. Major surgery ≤ 6 weeks prior to starting the trial treatment (or has not recovered from the side effects of such surgery) or plans to have surgery within 2 weeks of the first dose of the study drug.